This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: after use of document(): selecting parts of the obtained node-set
- From: "Joerg Heinicke" <joerg dot heinicke at gmx dot de>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 12 Apr 2002 00:25:04 +0200
- Subject: Re: [xsl] after use of document(): selecting parts of the obtained node-set
- References: <5.1.0.14.0.20020411225554.00aa4d50@mail.unique.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hello Ralph,
> <xsl:variable name="itn" select="document(itn.xml)" />
the problem is here: You select the string of a node <itn.xml> and the
document with this string will be stored. Because the string is empty, it
should be the stylesheet, which is stored in your variable. What you must
do, is to add single quotes around your filename: document('itn.xml')
> <xsl:apply-templates select="$itn/logo" />
Then you can access the nodes with select="$itn/itn/logo". Don't forget the
document element. If you change your variable itn to
"document('itn.xml')/itn" (it makes always sense in my eys) you can use your
above version.
> <xsl:apply-templates select="$itn//logo">.
This should work in every case, but, you know, it's not very good.
Regards,
Joerg
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list