Subject: Re: [xsl] Only child test From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Thu, 10 Oct 2013 00:45:00 -0400 |
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::*)) > 1"> <hr/> </xsl:if>
-- Public XSLT, XSL-FO, UBL & code list classes: Melbourne, AU May 2014 | Contact us for world-wide XML consulting and instructor-led training | Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm | Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ | G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx | Google+ profile: https://plus.google.com/116832879756988317389/about | Legal business disclaimers: http://www.CraneSoftwrights.com/legal |
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Only child test, Karl Stubsjoen | Thread | Re: [xsl] Only child test, Michael Kay |
[xsl] Only child test, Karl Stubsjoen | Date | Re: [xsl] Only child test, Michael Kay |
Month |