[Home] [By Thread] [By Date] [Recent Entries]
Ralph,
You're almost there; you only have to fix a couple of little errors: At 06:04 PM 4/11/2002, you wrote: I use the document function to load a document from within a stylesheet, and store the resulting nodeset in a variable: This should be select="document('itn.xml')". As it stands it is taking the value of the <itn.xml> element child of the context node as its argument. Since you have none, it comes back empty. Now I'd like to access certain parts of this nodeset, like this: The select="$itn/logo" looks good *except* your node set has a root node above the <itn> element, so there is no such node (no <logo> child of the root node). select="$itn/itn/logo" will work (or just set your variable to document('itn.xml')/itn to begin with. and for the sub-nodeset $itn/logo I have the following template: This will work fine. 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">. $itn//logo will work, though be less efficient than $itn/itn/log or $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? No, you get it, you just have some syntax buglets. Cheers, Wendell
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|

Cart



