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

Thanks.

Just to reiterate, it's not clear that either the uppercase or lowercase
return value from fn:name() is out of spec.


On Thu, Aug 1, 2013 at 11:57 AM, Michael Kay <mike@saxonica.com> wrote:

> Section 3.3 of the cited document says that when using DOM APIs,
> (specifically Element.tagName and Node.nodeName) node names are returned in
> uppercase.
>
> The document makes no statement as far as I can see about how names are
> presented when viewed via XPath interfaces. If this is correct then it
> seems like a serious omission. I can understand that some vendors would
> choose to return the same from XPath as from DOM.
>
> In Saxon-CE we decided to treat all HTML element and attribute names as
> lowercase: see
>
> http://www.saxonica.com/ce/user-doc/1.1/index.html#!coding/result-documents
>
> but I don't believe that decision was dictated by any standards.
>
> Michael Kay
> Saxonica
>
> (personal response)
>
> On 1 Aug 2013, at 14:01, Michael Kay wrote:
>
> >
> > 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:
> >
> > http://dev.w3.org/html5/spec-LC/apis-in-html-documents.html
> >
> > 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
> > Saxonica
> >
> >
>
>

Received on Thursday, 1 August 2013 21:27:11 UTC