Topic: Help with counting nodes plz (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=25271" title="Pages that link to Topic: Help with counting nodes plz (Page 1 of 1)" rel="nofollow" >Topic: Help with counting nodes plz <span class="small">(Page 1 of 1)</span>\

 
baz7621
Neurotic (0) Inmate
Newly admitted

From:
Insane since: Mar 2005

posted posted 03-15-2005 20:24

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>



And in my xsl page I been trying stuff like

code:
<xsl:value-of select="count(SPEECH[$speaker]/LINE)" />


and

code:
<xsl:value-of select="count(SPEECH[./SPEAKER[PUCK]]//LINE" />



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



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu