- From: Alex Milowski <alex@milowski.org>
- Date: Thu, 12 Oct 2006 09:44:04 -0700
- To: public-xml-processing-model-wg <public-xml-processing-model-wg@w3.org>
Jeni suggested that computed parameters we necessary for the following example: <p:pipeline> <p:declare-input port="manifest" /> <p:declare-output port="results" sequence="yes" step="load-documents" source="result" /> <p:for-each name="load-documents"> <p:declare-input port="file-ref" source="manifest" select="/files/file" /> <p:declare-output port="result" step="load-document" source="result" /> <p:step name="load-document" type="p:load"> <p:param name="href" source="file-ref" select="@href" /> </p:step> </p:for-each> </p:pipeline> We already have a use case (5.6) that starts by reading a list of documents (a manifest). The above example is just a simplification of that use case. This use case is easily solved by use of xinclude: <p:pipeline> <p:declare-input port="manifest" /> <p:declare-output port="results" sequence="yes" step="load-documents" source="result" /> <p:for-each name="load-documents"> <p:declare-input port="file-ref" source="manifest" select="/files/file" /> <p:declare-output port="result" step="load-document" source="result" /> <!-- make an xinclude from the href --> <p:step name="make-xinclude" type="p:xslt"> <p:input name="document" step="load-documents" port="file-ref"/> <p:input name="transform"> <xsl:transform version="1.0"> <xsl:template match="file"> <x:include href="{@href}"/> </xsl:template> </xsl:transform> </p:input> </p:step> <!-- load the document --> <p:step name="load-document" type="p:xinclude"> <p:input name="document" step="make-xinclude" port="result"/> </p:step> </p:for-each> </p:pipeline> Now the "input" to the loading of the document--which is the href URI value--is actually an input and not a dynamically bound input. Yes, it is slightly more verbose but it seems less cryptic to me. The good news here is that you can keep the base uri of the input document via an xml:base attribute in the transform. I don't see that we *need* computed paramters in version 1.0 to support this use case. -- --Alex Milowski "The excellence of grammar as a guide is proportional to the paucity of the inflexions, i.e. to the degree of analysis effected by the language considered." Bertrand Russell in a footnote of Principles of Mathematics
Received on Thursday, 12 October 2006 16:44:18 UTC