- From: Jostein Austvik Jacobsen <josteinaj@gmail.com>
- Date: Sat, 11 Dec 2010 02:32:35 +0100
- To: David <david@davidpriest.ca>
- Cc: xproc-dev@w3.org
- Message-ID: <AANLkTi=8F-tEvHHJdJi9EUT9MUh0r8-krSRywsTbKPzi@mail.gmail.com>
I don't know what your XSLT does, but to see what a p:for-each matches, you can for instance switch the p:store with a p:add-attribute and have a look at the output. If the XSLT output is not valid XML though, then I don't know. You might also want a select on the p:iteration-source. <?xml version="1.0"?> <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:c=" http://www.w3.org/ns/xproc-step" version="1.0" name="bootstrap"> <p:input port="source"/> <p:output port="result"/> <p:identity name="extract_literate_programs"> <p:input port="source"> <p:inline> <foo> <bar/> <bar/> </foo> </p:inline> </p:input> </p:identity> <p:for-each> <p:iteration-source select="/foo/bar"> <p:pipe step="extract_literate_programs" port="result"/> </p:iteration-source> <p:add-attribute match="/*" attribute-name="this" attribute-value="is the matched element"/> </p:for-each> <p:wrap-sequence wrapper="foo"/> </p:declare-step> Regards Jostein 2010/12/11 David <david@davidpriest.ca> > Is there any reason to believe that the XProc below would error-out with an > XD0001 (non-XML resource)? When the self-same XSLT transformation is run > through Saxon, it correctly produces the files through its result-document() > statements. > > How can I discover exactly what is being received by the p:store statement? > If I could only see the (presumably non-XML) data, I'd have a much better > clue as to what the problem is. > > <?xml version="1.0"?> > <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="1.0" > name="bootstrap"> > <p:xslt name="extract_literate_programs" version="2.0"> > <p:input port="source"> > <p:document href="bootstrap_literate_xml.xml"/> > </p:input> > <p:input port="stylesheet"> > <p:document href="bootstrap_tangle.xsl"/> > </p:input> > <p:input port="parameters"> > <p:empty/> > </p:input> > </p:xslt> > <p:sink/> > <p:for-each> > <p:iteration-source> > <p:pipe step="extract_literate_programs" port="secondary"/> > </p:iteration-source> > <p:store> > <p:with-option name="href" select="concat('src-',p:iteration-position())"/> > </p:store> > <p:identity/> > </p:for-each> > </p:declare-step> > > >
Received on Saturday, 11 December 2010 01:33:29 UTC