|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] limitations of preceding-sibling and following-sibling
I'm hitting a limitation of xPath with
preceding-sibling and following-sibling. In
which I'm having trouble creating the following:
<ul>
<li>first list element</li>
<li>second list element</li>
<ul>
<text>some text</text>
<ul>
<li>another list</li>
<li>second anon list</li>
</ul>
from the following:
<textItems>
<bullet>first list element</bullet>
<bullet>second list element</bullet>
<normal>some text</normal>
<bullet>another list</bullet>
<bullet>second anon list</bullet>
</textItems>
I have the following stylesheet that will grab
the first group of bullets, but it will grab
all the bullets and not seperate the other
group of bullets. These appears to be a limitation
of axis groupings.
<xsl:for-each select="//normal|//bullet">
<xsl:choose>
<xsl:when select="self::normal">
</xsl:when>
<xsl:when select="self::bullet">
<xsl:if test="not(preceding-sibling::bullet)">
<ul>
<xsl:for-each select="self::bullet|following::bullet">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ul>
</xsl:if>
</xsl:when>
</xsl:choose>
</xsl:for-each>
Earl Bingham
1568 Plateau Avenue
Los Altos Hills, CA 94024
H: (650) 559-1738
C: (408) 806-6642
____________________________________________________
get your permanent, free email at http://www.flashemail.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








