Subject: Re: [xsl] creating a temporary document from multiple inputs From: Graydon <graydon@xxxxxxxxx> Date: Sat, 9 Mar 2013 11:58:16 -0500 |
On Sat, Mar 09, 2013 at 05:30:11PM +0100, Wolfgang Laun scripsit: > See inline. > On 09/03/2013, Graydon <graydon@xxxxxxxxx> wrote: > > On Sat, Mar 09, 2013 at 05:02:19PM +0100, Wolfgang Laun scripsit: [snip] > >> What surprised me was that I could use > >> <xsl:sequence select="document($paths)"/> > >> without an error, which would make the document-nodes of the inputs > >> children of the temporary document-node. Is the XSL processor clever > > > > Betcha you can't. > What, exactly? Both forms - with and without '/*' - appear to work > correctly - at least the key() function delivers. Which surprised me, because I wouldn't have expected <xsl:sequence select="document($paths)"/> to work, then I went and looked at the spec for the surrounding xsl:document, an instruction I don't think I've ever used. > I just wondered why I don't have to select the document-nodes' *children*. Sequence constructor rules, item 4 -- http://www.w3.org/TR/xslt20/#constructing-complex-content "Any document node within the result sequence is replaced by a sequence containing each of its children, in document order." So you just can't put a document node in a document node via any sequence constructor, which makes sense. So, yes, processor _has_ to be clever enough, it's in the spec. :) -- Graydon
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] creating a temporary docu, Wolfgang Laun | Thread | Re: [xsl] creating a temporary docu, David Carlisle |
Re: [xsl] creating a temporary docu, Wolfgang Laun | Date | [xsl] XML and JSON browser performa, David Lee |
Month |