xsl-list
[Top] [All Lists]

RE: getting node type in xsl

2004-09-08 13:59:07
Still, how does xslt 2.0 without the schema aware extension help me in
my problem nr. 1?

Schema-awareness isn't an "extension" to XSLT 2.0, it's an integral part of
the standard. Your only problem is, it doesn't come for free :-)

So, anyone got an idea about nr. 2 (using the stylesheet to produce an
element's xpath something I can print out)?
I tried

  <xsl:template
   match="node()">
   <xsl:variable name="xpath" select="concat(../$xpath, '/',
local-name(),'[', position(), ']')"/>
    <fieldset>
      <legend>
        <xsl:value-of
         select="$xpath" />
      </legend>
...


Saxon has an extension function for this but there are templates you can
pick up to do it. Google for "XSLT template to get a path to a node".

Michael Kay



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