[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Only child test

Subject: [xsl] Only child test
From: Karl Stubsjoen <kstubs@xxxxxxxxx>
Date: Wed, 9 Oct 2013 21:38:58 -0700

Just curious how other's might approach a test to determine if the
current node is *not* an only child. This works fine but it feels a
little heavy to me.  Thoughts?

                <xsl:if test="(count(preceding-sibling::*) +
count(following-sibling::*)) &gt; 1">

Current Thread