|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] alpha comparison
I need to check if the following-sibling has
a child with content <tba> than the current node.
Its a security check to ensure that the input file is
in sorted order (No I won't say why, its too
embarassing).
tba because I'm unsure of the comparison I need.
the check i'm using for identical sibling is
in sorted order, hence the comparison I need
needs to be something like >= or similar,
but I can't get it to work.
So in English I want...
variable name=this-topic select=topic
If the following-sibling::qna/topic has
a 'natural sorted order greater than' value than $this-topic
then process it
else
xsl:message> value-of this-topic value-of following-sibling::qna/topic
</xsl:message
So that the processing bombs out if I screw up, i.e. the input
is not in sorted order.
Please excuse the pidgeon English/pidgeon xsl
my brain is getting scrambled at the moment.
My best attempt to date is
<xsl:for-each select="qna">
<xsl:variable name="this-topic"/>
<xsl:sort select="topic"/>
<xsl:if test="not(following-sibling::qna/topic >= $this-topic)">
<xsl:message terminate="yes">
This <xsl:value-of select="$this-topic"/>
Next <xsl:value-of select="following-sibling::qna/topic"/>
</xsl:message>
</xsl:if>
</xsl:for-each>
TIA DaveP
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








