You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Edwards, Jayme" <JC...@software.rockwell.com> on 2000/04/27 23:52:42 UTC

storing nodes from multiple documents in a single variable

I've been reading alot in the specs about using document() to load other documents for use in generating the results of an XSL transformation. I've used document all over the place before, but right now I have a need to load multiple XML documents who's filenames are retrieved from text inside elements of the first (target) document and to create a global <xsl:variable> who's nodelist is a combination of the document element's of the files loaded by document(). Is it possible to do this, or is there another way to do this?  I've tried:

<xsl:stylesheet xmlns....etc.>
	<xsl:variable name="multiple-doc-root-nodes-ref">
		<xsl:for-each select="/mydoc/myelemswithfilenames">
			<xsl:value-of select="document(@filename)"/>
		</xsl:for-each>
	</xsl:variable>
</xsl:stylesheet>

to no avail.

<xsl:stylesheet xmlns....etc.>
	<xsl:variable name="multiple-doc-root-nodes-ref" select="document('myfilename')">
</xsl:stylesheet>

works, but doesn't allow me to build the variable dynamically.

Any tips?

Jayme