Subject: Re: [xsl] Can a streaming loop be inside a non-streaming loop? From: "Michael Kay michaelkay90@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 8 Aug 2025 11:38:06 -0000 |
The basic issue here is that you can't bind a variable to a streamed node (because it would lose its value when you move past that node). And underlying that is that you're trying to make multiple passes over the streamed content, which isn't allowed: you can only move fowards in the file, never back. Since the multiple passes are each processing the whole document, I would do: > <xsl:template name="main"> > <xsl:for-each select="$identifiers/identifier"> > <xsl:variable name="ident" select="."/> > <xsl:source-document href="records.xml" > streamable="yes"> > <results> > <xsl:variable name="records" select="/*"/> > <xsl:for-each select="/*/record/copy-of()"> > ... > </xsl:for-each> > </xsl:for-each> > </results> > </xsl:source-document> </xsl:for-each> > </xsl:template> Michael Kay Saxonica
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Can a streaming loop be i, Martin Honnen martin | Thread | Re: [xsl] Can a streaming loop be i, Roger L Costello cos |
Re: [xsl] Can a streaming loop be i, Martin Honnen martin | Date | Re: [xsl] Can a streaming loop be i, Roger L Costello cos |
Month |