Re: [xsl] Does starts-with() convert the strings to codepoints?

Subject: Re: [xsl] Does starts-with() convert the strings to codepoints?
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 8 Jul 2024 12:15:08 -0000
On 08/07/2024 14:08, Roger L Costello costello@xxxxxxxxx wrote:
Hi Folks,

I have a question about the meaning of the starts-with() function. Consider
the strings in these two elements:

<Airport_Name>B &amp; B BOYS RANCH </Airport_Name> <name>B &#x26; B BOYS RANCH</name>

Notice the former uses the XML ampersand entity whereas the latter uses hex
character entity for ampersand. This expression:

starts-with(Airport_Name, name)


returns true.

Does the starts-with() function convert the strings to codepoints and then
checks that codepoint[i] in the <name> string equals codepoint[i] in the
<Airport_Name> string?

My understanding is that the XML parser has already parsed your lexical
differences into the same Unicode character(s) and that XPath simply
works with Unicode strings that are compared.

Current Thread