Subject: numbering the result tree From: "Shlomi Sarfati" <shlomi@xxxxxxxxxx> Date: Sun, 26 Nov 2000 15:24:05 +0200 |
hi I have a simple xml tree like this : <main> <list> <objects> </objects> <objects> </objects> <objects> </objects> <objects> </objects> <list> <objects> </objects> <objects> </objects> <objects> </objects> <objects> </objects> <list> <objects> </objects> <objects> </objects> <objects> </objects> <objects> </objects> </list> </list> </list> </main> each list have its objects and other lists that can have lists that can have lists ....... I built a simple xsl that transfer this xml to another xml but I need to give the result tree numbers that will define the tree ! . I need that the first list will be 1, 2, 3... N and all the nodes under a certain list will be X_1, X_2, X_3 ... X_N (where x is the father number) etc. my result tree should be unlimited in his depth (as deep as the source tree) this is my xsl : ---------------- <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/"> <xsl:apply-templates /> </xsl:template> <xsl:template match="main"> <xsl:apply-templates /> </xsl:template> <xsl:template match="list"> <!-- this is where i need to put the number that represent the node --> <xsl:apply-templates/> </xsl:template> <xsl:template match="object"> <!-- irrelevant --> <xsl:apply-templates/> </xsl:template> </xsl:stylesheet> hope I made my self clear, and thanks for the help shlomi XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Changing a xsl:param value from, Kay Michael | Thread | Re: Changing a xsl:param value from, Dimitre Novatchev |
re: how to access the text of just , Dave Gomboc | Date | Re: Char node-type, David Carlisle |
Month |