[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: getting node type in xsl

Subject: RE: getting node type in xsl
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Wed, 8 Sep 2004 21:59:07 +0100
xsl print node type
> 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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.