[xsl] Re:recursive problem with full path and position info

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

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
I am using Msxml3, and ie5, the complete xsl are listing below fyi.


Sun-fu Yang


**  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"

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

<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-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread