#1 2006-08-20 03:28:27

stufow
New member
Ranking
Registered: 2006-08-14
Posts: 9
Expertise

XSL syntax

What is the syntax in XSL to test :

If there is only one item in the XML.

Following sytax is not working.

<xsl:when test="count(SUB_MENU[@active='True']) = 0">

Thanks.

Offline

 

#2 2006-08-27 03:37:20

Jticks
New member
Ranking
Registered: 2006-08-27
Posts: 3
Expertise

Re: XSL syntax

<xsl:when test="count(SUB_MENU[@active='True']) = 0">

Isn't that testing if there are no items/nodes in the XML?

Try:

<xsl:if test="count(SUB_MENU[@active='True']) = 1" >
<xsl:text>There is one item</xsl:text>
</xsl:if>

Offline

 

Board footer

OPML feedsRSS feeds



Powered by WWWThreads Forum
© Copyright 2006, WWWThreads