I'm running 2.0, so that is the perfect solution!
Thanks so much, Ken. :-)
----- Original Message ----
From: G. Ken Holman <gkholman(_at_)CraneSoftwrights(_dot_)com>
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Sent: Thursday, October 16, 2008 1:15:26 PM
Subject: Re: [xsl] calculating relative position in document order
XSLT 2.0 has the operators "<<" and ">>" returning true and false
regarding the first operand being (respectively) before or after the
second operand in document order.
Are you restricted to XSLT 1?
. . . . . . . . . Ken
At 2008-10-16 09:53 -0700, tom s wrote:
I'd like to be able to determine which element is "closer", in terms
of document order, to a given element. eg, given two structures
containing siblings:
<a>
<b>
<c>
and
<b>
<a>
<c>
I'd like to detect that the second structure is "out of order". In
my fantasy pseudo code, I might express the constraint as:
//c[positionEX(preceding::a[1]) > positionEX(preceding::b[1])]
Where my fantasy positionEX() function returns the absolute position
of the argument in the document.
Am I missing something, or is implementing this operation in real
xpath/xslt much more difficult than it seems it should be?
--
Upcoming XSLT/XSL-FO hands-on courses: Wellington, NZ 2009-01
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video sample lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg
Video course overview: http://www.youtube.com/watch?v=VTiodiij6gE
G. Ken Holman mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/
Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers: http://www.CraneSoftwrights.com/legal
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--