|
Subject: [xsl] getting the context out of a variable From: Jörg Heinicke <Joerg.Heinicke@xxxxxx> Date: Tue, 18 Sep 2001 14:11:46 +0200 (MEST) |
Hello,
another problem, which I have, is getting the context out of a variable.
An example:
<xsl:variable name="tree" select="document(tree.xml)/root"/>
<xsl:template match="/">
<xsl:apply-templates select="$tree/node"/>
</xsl:template>
<xsl:template match="node">
<!-- the context is here now in the variable -->
<xsl:if test="@name = /page/html/node/@name">
<!-- this won't work for a XML-input-file with this structure
because the context is the variable and there is the structure /root/node. -->
</xsl:if>
</xsl:template>
The only solution I found until now was to store the original XML-file in a
variable too and use it like following:
<xsl:if test="@name = $original/page/html/node/@name">
But is there a better solution?
Thanks in advance,
Joerg
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] forcing a carriage return, Michael Kay | Thread | RE: [xsl] getting the context out o, Michael Kay |
| [xsl] forcing a carriage return, li, Jörg Heinicke | Date | Re: [xsl] forcing a carriage return, Guillaume Rousse |
| Month |