[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

alpha comparison

Subject: alpha comparison
From: "Dave Pawson" <dave.pawson@xxxxxxxxxx>
Date: Sun, 9 Apr 2000 18:40:59 +0100
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 &gt;= $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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.