- From: Alex Milowski <alex@milowski.org>
- Date: Wed, 05 Jul 2006 13:49:03 -0700
- To: public-xml-processing-model-wg <public-xml-processing-model-wg@w3.org>
- Message-ID: <44AC25BF.5090508@milowski.org>
The use case is here:
http://www.w3.org/TR/xproc-requirements/#use-case-rss-descriptions
Parsing descriptions looks like:
<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">
<p:output name="final" from="parse"/>
<p:step kind="p:parse">
<p:input name="document" from="iteration"/>
<p:output name="parse" from="result"/><!-- Note: the component
names this -->
<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>
Escaping (serializing) descriptions looks like:
<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">
<p:output name="final" from="serialize"/>
<!-- serializes the children into a text node -->
<p:step kind="p:serialize">
<p:input name="document" from="iteration"/>
<p:output name="serialize" from="result"/><!-- Note: the
component names this -->
<p:parameter name="children" value="true"/>
</p:step>
</p:for-each>
</p:pipeline>
--Alex Milowski
Attachments
- text/xml attachment: use-case-5.15-1.xml
- text/xml attachment: use-case-5.15-2.xml
Received on Wednesday, 5 July 2006 20:49:46 UTC