W3C home > Mailing lists > Public > public-qt-comments@w3.org > August 2013

Re: [FO] Return value of fn:name ?

From: Michael Kay <mike@saxonica.com>
Date: Thu, 1 Aug 2013 14:01:24 +0100
Cc: public-qt-comments@w3.org
Message-Id: <641AFD97-640C-402E-870C-36E2C8ED09CB@saxonica.com>
To: Buck Golemon <buck@yelp.com>

On 29 Jul 2013, at 19:56, Buck Golemon wrote:

> It's come to my attention recently that Firefox returns upper-cased strings from the xpath name() function, while other implementations I've surveyed return a not-upper-cased string (I haven't yet checked whether they are forcefully lower-cased or simply untouched).
> Is one of these implementations out of spec?
> I'd like to bring this inconsistency to the attention of implementers and ask them to "fix" it, but I'd want to bring them a definitive specification of Correct behavior.
> If anyone requests a thorough survey of implementation behavior (in regards to fn:name() return value casing) I will do so.
> -buck

XPath is defined to operate on the XPath data model (called XDM in the 2.0 version), in which the case of names is significant. It allows you to construct your XDM model from some other model (for example an HTML DOM), but it doesn't say how this should be done. Presenting all the names as lower case or presenting them all as upper case (or indeed, leaving them as written) are all perfectly acceptable as far as the XPath specification is concerned. If there are standards for mapping the HTML DOM to the XPath model, they aren't to be found here.

Section 3.5 of the HTML5 specification is relevant, though it focusses on namespace issues rather than case-sensitivity:


You'll notice that they've defined a unilateral change to the XPath spec when applied to HTML5. All a bit of a mess really.

(personal response)

Michael Kay
Received on Thursday, 1 August 2013 13:01:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:44 UTC