This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

after use of document(): selecting parts of the obtained node-set


Hi,

first, thanks to all the people who helped me with my problems the last few 
days!

Unfortunately, I've got a new one:

I use the document function to load a document from within a stylesheet, 
and store the resulting nodeset in a variable:

<xsl:variable name="itn" select="document(itn.xml)" />

I believe this works. The variable is top-level, by the way.

The document itn.xml has the following structure:

<itn>
	<logo>
		some child elements
	</logo>
	
	<menu>
		some child element
	</menu>
</itn>

Now I'd like to access certain parts of this nodeset, like this:

<xsl:template>

...

	<xsl:apply-templates select="$itn/logo" />

...

</xsl:template>

and for the sub-nodeset $itn/logo I have the following template:

<xsl:template match="itn/logo">
	extract data
</xsl>

Unfortunately, whenever I try this combination, the result of my 
<xsl:apply-templates select="$itn/logo"> is empty. The same is true when I 
do a select like <xsl:apply-templates select="$itn//logo">.

Maybe I haven't understood the functionality of document() or how to access 
parts of a node set that is returned by document()? Can someone help me, 
please?

Thanks a lot,
Ralph


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]