xsl-list
[Top] [All Lists]

RE: Accessing a variable defined in the parent node

2003-11-21 00:59:39
If I have

<xsl:template match="direcciones">
  <xsl:param name="source" />
  <xsl:apply-templates select="ROWSET" />
</xsl:template>

<xsl:template match="direcciones/ROWSET">
  <!-- I want to access here "source" variable without the 
need of re-passing it as parameter --> </xsl:template>

How can I do it?


You can't; though if you're using Saxon 7.x and XSLT 2.0 you might like
to look at how the new facility called "tunnel parameters" can help you.

Your subject line, incidentally, suggests that you are still a bit
muddled about XSLT concepts. The variable is not defined "in the parent
node". It is defined in the template rule that matches the parent node.

Michael Kay


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



<Prev in Thread] Current Thread [Next in Thread>