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

Re: xpath index-of function using xslt 3.0

Subject: Re: xpath index-of function using xslt 3.0
From: "Mukul Gandhi mukulg@xxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 4 Oct 2025 04:54:32 -0000
Re:  xpath index-of function using xslt 3.0
Hi Martin,
        Thanks for insightful discussion about this mail thread.

On Fri, Oct 3, 2025 at 7:55b/PM Martin Honnen martin.honnen@xxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

>https://www.w3.org/TR/xpath-functions-31/#func-index-of says

>The items in the sequence $seq are compared with $search under the rules
for the eq operator. Values of type xs:untypedAtomic are compared as if
they were of type xs:string. Values >that cannot be compared, because the
eq operator is not defined for their types, are considered to be distinct.
If an item compares equal, then the position of that item in the sequence
>$seq is included in the result.

>So if you use = instead of eq you are not implementing the XPath 3.1
function 'index-of'

I've tested my XSL stylesheet written previously within this mail thread,
with following changes as suggested by you,

<xsl:if test=". eq $srch1">
  <!-- code -->
</xsl:if>

and also with

not(. ne $srch1)        <!-- for my interest -->

With both of these XSL stylesheet code modifications, an XSL stylesheet
example that I've written previously, works fine with Apache Xalan XSLT
3.0's development code.

Thanks, to Mike as well, for his suggestions that I'll try with little
later.

--
Regards,
Mukul Gandhi

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.