JoeMcGarvey
Programmer
I have a for-each statement that looks for certain parameters in the node set (namely an empty value for "Points"
. If the next list item value for "Points" is empty, it displays that record asking for a value for "Points".
XSL:
<xsl:for-each select="//entity[@id='Statistics']/contents/entity[@type='listitem'][child:
oints='']">
... provide a value for points
</xsl:for-each>
XML:
<entity type="list" id="Statistics">
<contents>
<entity type="listitem">
<Points>23</Points>
</entity>
<entity type="listitem">
<Points>15</Points>
</entity>
<entity type="listitem">
<Points></Points>
</entity>
</contents>
</entity>
The problem:
If all "Points" nodes in the list are defined and not null, then output a message saying "No remaining statistics"... but I don't know how to set the if statement since the for-each statement doesn't instantiate because it can't match the defined criteria.
Any ideas?
Joe McGarvey - Web Application Developer
Paragraph, Inc. - Paragraph Publisher -
XSL:
<xsl:for-each select="//entity[@id='Statistics']/contents/entity[@type='listitem'][child:
... provide a value for points
</xsl:for-each>
XML:
<entity type="list" id="Statistics">
<contents>
<entity type="listitem">
<Points>23</Points>
</entity>
<entity type="listitem">
<Points>15</Points>
</entity>
<entity type="listitem">
<Points></Points>
</entity>
</contents>
</entity>
The problem:
If all "Points" nodes in the list are defined and not null, then output a message saying "No remaining statistics"... but I don't know how to set the if statement since the for-each statement doesn't instantiate because it can't match the defined criteria.
Any ideas?
Joe McGarvey - Web Application Developer
Paragraph, Inc. - Paragraph Publisher -