[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] position in the tree
Subject: Re: [xsl] position in the tree From: "Joerg Heinicke" <joerg.heinicke@xxxxxx> Date: Tue, 12 Mar 2002 20:15:11 +0100 |
<xsl:template match="pregunta"> <xsl:for-each select="ancestor::pregunta"> <xsl:text> </xsl:text> </xsl:for-each> <xsl:value-of select="normalize-space(text())"/> <xsl:text> </xsl:text> <xsl:apply-templates select="pregunta"/> </xsl:template> output: 1 1.1 1.1.1 1.1.2 For HTML you can replace ' ' with '  ' and '<xsl:text> </xsl:text>' with '<br/>'. Regards, Joerg > if i have the next xml how can i determine where i am? > > <foro> > <pregunta>1 > <pregunta>1.1 > <pregunta>1.1.1</pregunta> > <pregunta>1.1.2</pregunta> > </pregunta> > </pregunta> > <foro> > > how can i determine the number of child? > the numbor of indentation? > thanks XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] position in the tree, Carlos | Thread | [xsl] avoiding Repetition - further, stevenson |
Re: [xsl] remaining part of( IF-Te, Mike Brown | Date | Re: [xsl] inserting spaces ( ), Peter Davis |
Month |
Keywords