Subject: [xsl] Re:recursive problem with full path and position info From: "Yang" <sfyang@xxxxxxxxxxxxx> Date: Mon, 30 Apr 2001 15:06:55 +0800 |
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="." />'
<xsl:text /> </xsl:template> </xsl:stylesheet> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSL lint, Joerg Pietschmann | Thread | Re: [xsl] Re:recursive problem with, Jeni Tennison |
RE: [xsl] How do I do an If sort of, Tim Watts | Date | [xsl] import-apply-param etc?, Koray Berk |
Month |