|
Subject: [xsl] XPath problem: Checking if imidiately preceding sibling is of a certain kind From: "Ragulf Pickaxe" <jawxml@xxxxxxxxxxx> Date: Fri, 27 Feb 2004 09:37:05 +0000 |
<root>
<X><A a="1"/><A a="1"/><A a="2"/>Some text</X>
<X><A a="4"/>Some text<br/>
<A a="5"/>More text<br/>
<A a="7"/>Even more text</X>
</root><xsl:template match="/"> <xsl:apply-templates select="*"/> </
<xsl:template match="A[1]"> <!-- This groups all the A elements in a given X element This means that the second X gets the grouped too much --> </
<xsl:template match="A"> <!-- This one does not group any of them --> </
<xsl:choose>
<xsl:when test="not('The preceding sibling is an A node')"/>
<!-- Do something -->
</
<xsl:otherwise>
<!-- At the moment do nothing -->
</
</Regards, Ragulf Pickaxe :)
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Re: attribute values as n, James A. Robinson | Thread | Re: [xsl] XPath problem: Checking i, David Carlisle |
| Re: [xsl] Re: attribute values as n, James A. Robinson | Date | Re: [xsl] Outputting A tag informat, David Carlisle |
| Month |