W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > July 2006

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

From: Alex Milowski <alex@milowski.org>
Date: Wed, 12 Jul 2006 18:04:36 -0700
Message-ID: <44B59C24.8030606@milowski.org>
To: public-xml-processing-model-wg <public-xml-processing-model-wg@w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:48 GMT