Re: [Technical Errata Reported] RFC5261 (3477)
Bjoern Hoehrmann <[email protected]> Tue, 05 Feb 2013 12:16:58 +0100
| Newsgroups | gmane.ietf.simple |
|---|---|
| Message-ID | <[email protected]> |
* RFC Errata System wrote: >Original Text >------------- >In XPath 2.0, a "bar" selector >not only matches an unqualified <bar> element, but also matches a >qualified <bar> element that is in scope of a default namespace >declaration. In contrast, in this specification, a selector without >a prefix only matches one element, and it may match an element with >or without a prefix but only if the namespace it's qualified with (or >none) is an exact match. >Notes >----- >The original text is not easy to understand, but seems to assume that >an unprefixed name in XPath 2.0 matches both unprefixed names, and = >prefixed ones that have the same namespace than the default namespace of = >the XPath static context. This is not the case: Matching depends on how = >the "default element/type namespace" of the XPath static context is = >defined, and then matches either namespace-less elements, or those in = >the "default element/type namespace", but never both. This context, = >however, is defined by the XPath itself, not by the document. Thus, it = >can be set externally and could be set to the diff document's default = >namespace (if there is one). In that case, XPath 2.0 can be used to = >evaluate XML Patch selectors. Indeed, see <http://www.w3.org/TR/xpath20/#node-tests>, 3rd paragraph. (I do note that this is not the only difference between XPath 1.0 and XPath 2.0, so the conclusion that then XPath 2.0 can be used to evalu- ate XML Patch selectors is not necessarily correct, especially if it cannot be assumed that defaults like "Default element/type namespace" cannot be assumed to be chosen to maximise compatibility. But that is out of scope of the Original Text this item is concerned with.) -- = Bj=F6rn H=F6hrmann =B7 mailto:[email protected] =B7 http://bjoern.hoehrma= nn.de Am Badedeich 7 =B7 Telefon: +49(0)160/4415681 =B7 http://www.bjoernsworld.de 25899 Dageb=FCll =B7 PGP Pub. KeyID: 0xA4357E78 =B7 http://www.websitedev.d= e/ =