Subject: [xsl] xsl:attempting a preceding-sibling test with different code From: "Carrie Kaufman" <ckaufman01@xxxxxxxxxxx> Date: Thu, 10 Oct 2002 17:28:57 -0400 |
xml: <parks> <name>Shea<name> <field> <type>Grass<type> <maint>yes<maint> </field> <name>Turner<name> <field> <type>Turf<type> <maint>no<maint> </field> <name>Wrigley<name> <field> <type>grass<type> <maint>yes<maint> </field> <name>Bankone<name> <field> <type><type> <maint>no<maint> </field> </parks>
xsl: <DIV> <xsl:for-each select="context()[. != '']" order-by="type"> <xsl:choose> <xsl:when test="context()[type != '']"> <xsl:if test="type[text() != context(-2)/text()]"> <xsl:value-of select="type"/> </xsl:if> </xsl:when> <xsl:otherwise>Unknown Type</xsl:otherwise> </xsl:choose> </xsl:for-each> <DIV CLASS="pe2"> <xsl:for-each select="name[. != '']"> <xsl:value-of/> <BR/> </xsl:for-each> </DIV> </DIV>
Intended Result: Grass Shea Wrigley
Turf Turner
Unknown Type Bankone
TIA, I can really use the help! Carrie Kaufman GIS Analyst ckaufman01@xxxxxxxxxxx
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: How can I get the XPATH o, Dimitre Novatchev | Thread | RE: [xsl] xsl:attempting a precedin, Michael Kay |
RE: [xsl] removing tab formatting d, Macaulay,Malcolm (US | Date | RE: [xsl] removing tab formatting d, Richard Lander |
Month |