|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: only display if subnodes occur more than once
I wrote: > <xsl:template match="sub_a|sub_b|sub_c"> > <xsl:variable name="copy" > select="boolean(*/following-sibling::*[local-name() = > preceding-sibling::*/local-name()])"/> > > <xsl:if test="$copy"> > <xsl:copy-of select="."/> > </xsl:if> > </xsl:template> ...which relies on the slash operator in 2.0. A 1.0 solution that I've cobbled together quickly is: <xsl:template match="sub_a|sub_b|sub_c"> <xsl:variable name="copy"> <xsl:for-each select="*"> <xsl:if test="following-sibling::*[local-name() = local-name(current())]">true</xsl:if> </xsl:for-each> </xsl:variable> <xsl:if test="contains($copy, 'true')"> <xsl:copy-of select="."/> </xsl:if> </xsl:template> (Not very good)
|
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








