OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
Help with counting nodes plz
This page's ID:
25271
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Hiya All! I am trying to get a very simple count function to work but cant maybe someone can help I have a xml page laid out as [code] <SPEECH> <SPEAKER>PUCK</SPEAKER> <LINE>How now, spirit! whither wander you?</LINE> </SPEECH> [/code] And in my xsl page I been trying stuff like [code] <xsl:value-of select="count(SPEECH[$speaker]/LINE)" /> [/code] and [code] <xsl:value-of select="count(SPEECH[./SPEAKER[PUCK]]//LINE" /> [/code] where $speaker is the variable, which I know does work. Even replacing $speaker with PUCK or 'PUCK' doesn't work. The aim being to return a value of "1", if I were to use the above XML. This is all being done within a template matching "SCENE", where SCENE is the immediate parent of SPEECH. Can anyone help? It is only so that I can put it within a choose statement to say that if the line count for a certain speaker is equal to zero, then it will display "Does not appear" in the scene. Thanks In advance
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »