Re: Use Case 5.15: Parse and/or Serialize RSS descriptions

The parse pipeline:

<p:pipeline xmlns:p='http://www.w3.org/2006/XProc'
         xmlns:c='http://www.w3.org/2006/XProc/Components'
         xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
         xsi:schemaLocation='http://www.w3.org/2006/XProc pipeline.xsd'
         xmlns:xhtml='http://www.w3.org/1999/xhtml'
 
xmlns:t="http://www.smallx.com/Vocabulary/Services/Tideinfo/2005/1/0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <p:input name="feed"/>
    <p:output name="processed-feed" from="final"/>

    <!-- parse the children of the RSS description elements so that it 
can be processed
         with XML tools -->
    <p:for-each select="description" over="feed" to="iteration"
                replacement="parsed">
       <p:output name="final" from="feed"/>
       <p:step kind="p:parse">
          <p:input name="document" from="iteration"/>
          <!-- Note: the component names this -->
          <p:output name="parsed" from="result"/>
          <p:parameter name="type" value="html"/>
          <p:parameter name="children" value="true"/>
          <p:parameter name="default-namespace"
                       value="http://www.w3.org/1999/xhtml"/>
       </p:step>
    </p:for-each>

</p:pipeline>

The escape pipeline:


<p:pipeline xmlns:p='http://www.w3.org/2006/XProc'
         xmlns:c='http://www.w3.org/2006/XProc/Components'
         xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
         xsi:schemaLocation='http://www.w3.org/2006/XProc pipeline.xsd'
         xmlns:xhtml='http://www.w3.org/1999/xhtml'
 
xmlns:t="http://www.smallx.com/Vocabulary/Services/Tideinfo/2005/1/0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <p:input name="feed"/>
    <p:output name="processed-feed" from="final"/>

    <!-- serialize the children of the description to be compliant with
         RSS -->
    <p:for-each select="description" over="feed" to="iteration"
                replacement="serialized">
       <p:output name="final" from="feed"/>
       <!-- serializes the children into a text node -->
       <p:step kind="p:serialize">
          <p:input name="document" from="iteration"/>
           <!-- Note: the component names this -->
          <p:output name="serialized" from="result"/>
          <p:parameter name="children" value="true"/>
       </p:step>
    </p:for-each>

</p:pipeline>

Received on Thursday, 13 July 2006 01:11:35 UTC