Re: [Technical Errata Reported] RFC5261 (3477)
Erik Wilde <[email protected]> Tue, 05 Feb 2013 14:17:34 +0100
| Newsgroups | gmane.ietf.simple |
|---|---|
| Message-ID | <[email protected]> |
hello bjoern. thanks a lot for the quick feedback! On 2013-02-05 12:16 , Bjoern Hoehrmann wrote: > * RFC Errata System wrote: >> 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.) yes, you're right that this is not necessarily a correct conclusion. it would be really great to figure this out, though, because the convenience of being able to use a standard implementation cannot be overstated. i am writing http://tools.ietf.org/html/draft-wilde-xml-patch-01 which is intended to be based on RFC 5261 (which is why am reading it very closely now), and it would be great to have an implementation hints section (i am currently writing one) that would clearly tell implementers what they can and cannot use. it's bad enough that you cannot use a standard XPath 1.0 implementation; it would be great if at least XPath 2.0 would be usable. any insights would be greatly appreciated, i think i have to look closer into the XPath subset of the RFC and see whether that contains anything where XPath 1.0 and 2.0 differ. in the interest of readability, http://tools.ietf.org/html/draft-wilde-xml-patch-01#appendix-B now has an ABNF for the grammar in RFC 5261, where it's only defined in the XSD. i have also filed an erratum about the grammar, because it allows "id()", which never selects anything: http://www.rfc-editor.org/errata_search.php?rfc=5261&eid=3458 thanks again and cheers, dret. -- erik wilde | mailto:[email protected] - tel:+1-510-2061079 | | UC Berkeley - School of Information (ISchool) | | http://dret.net/netdret http://twitter.com/dret |