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

Re:recursive problem with full path and position info

Subject: Re:recursive problem with full path and position info
From: "Yang" <sfyang@xxxxxxxxxxxxx>
Date: Mon, 30 Apr 2001 15:06:55 +0800
root 2 recursive
Hi,

Dan, I found I got a different solution from yours  while experimenting Jeni
method as you suggested.
I  have root(2) instead of root(1) , perhaps you can correct me the missing
point.
I am using Msxml3, and ie5, the complete xsl are listing below fyi.

Thanks,

Sun-fu Yang

sfyang@xxxxxxxxxxxxx

**  output  result **
root(2).a(1).b(1) = '1'
root(2).a(1).b(2) = '2'
root(2).a(2).b(1) = '3'
root(2).a(2).b(2) = '4'

**xsl file **
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="*">
   <xsl:param name="path" />
   <xsl:apply-templates select="*">
      <xsl:with-param name="path" select="concat($path, name(), '(',
position(), ').')" />
   </xsl:apply-templates>
</xsl:template>

<xsl:template match="*[not(*)]">
   <xsl:param name="path" />
   <xsl:value-of select="$path" />
   <xsl:value-of select="name()" />(<xsl:value-of select="position()" />
   <xsl:text>) = '</xsl:text>
   <xsl:value-of select="." />'&#xA;<xsl:text />
</xsl:template>
</xsl:stylesheet>


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


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.