RFC Errata


Errata Search

 
Source of RFC  
Summary Table Full Records

Found 4 records.

Status: Held for Document Update (4)

RFC 5261, "An Extensible Markup Language (XML) Patch Operations Framework Utilizing XML Path Language (XPath) Selectors", September 2008

Source of RFC: simple (rai)

Errata ID: 3458
Status: Held for Document Update
Type: Technical
Publication Format(s) : TEXT

Reported By: Erik Wilde
Date Reported: 2013-01-16
Held for Document Update by: Gonzalo Camarillo

Section 8 says:

<!ENTITY id     "id\(('&ncname;')?\)|id\((&quot;&ncname;&quot;)?\)">

It should say:

<!ENTITY id     "id\('&ncname;'\)|id\(&quot;&ncname;&quot;\)">

Notes:

The regex in the XSD suggests that "id()" would be a valid selector for a patch, but it would not make sense to specify such a selector since it never would select a node (there's no identifier to locate in the document). This means that while "id()" is a valid XPath expression, it should not be allowed as a selector expression within an XML patch document.

Errata ID: 3465
Status: Held for Document Update
Type: Technical
Publication Format(s) : TEXT

Reported By: Erik Wilde
Date Reported: 2013-01-18
Held for Document Update by: Gonzalo Camarillo

Section 4.2.3 says:

- Lastly, if the above two rules still don't apply, first all
  in-scope namespace prefixes of the evaluation context node are
  arranged alphabetically in an ascending order. 

It should say:

n/a

Notes:

It is not entirely clear what "arranged alphabetically" refers to in this section. Sorting can be done in a variety of ways, and while many environment may have standard sort orders, not all are the same and for this standard to be implement consistently it's important to clearly state what sort order the above sentence is referring to. The suggested fix for this erratum is to add text that clearly states which sorting method should be used.

Errata ID: 3477
Status: Held for Document Update
Type: Technical
Publication Format(s) : TEXT

Reported By: Erik Wilde
Date Reported: 2013-02-05
Held for Document Update by: Gonzalo Camarillo

Section 4.2.2 says:

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.

It should say:

In XPath 2.0, a "bar" selector matches elements that have the URI of 
the "default element/type namespace", which is part of an XPath's 
static context. By setting this URI to the default namespace of the 
diff document (or leave it empty, if there is none), XPath 2.0's 
behavior matches the requirements of the previous section.

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.

Errata ID: 3478
Status: Held for Document Update
Type: Technical
Publication Format(s) : TEXT

Reported By: Erik Wilde
Date Reported: 2013-02-07
Held for Document Update by: Gonzalo Camarillo

Section 4.4.3 says:

4.4.3. Replacing a Namespace Declaration URI


   An example for a replacement of a namespace URI:

   <replace sel="doc/namespace::pref">urn:new:xxx</replace>

   This will replace the URI value of 'pref' prefixed namespace node
   with "urn:new:xxx".  The parent node of the namespace declaration
   MUST be the <doc> element, otherwise an error occurs.

It should say:

4.4.3. Replacing a Namespace URI


   An example for a replacement of a namespace URI:

   <replace sel="doc/namespace::pref">urn:new:xxx</replace>

   This will replace the URI of the namespace associated with the
   'pref' prefix with "urn:new:xxx". The parent node of the namespace
   declaration MUST be the <doc> element, otherwise an error occurs.
   Replacing the namespace at the element where it is declared MUST
   also change all namespace nodes derived from this declaration in
   descendant elements. 

Notes:

The spec uses the terms "namespace declaration" and "namespace" almost interchangeably, which is incorrect. It is impossible to select (and thus patch) *namespace declarations* using XPath. When selecting and replacing a *namespace*, then it should be taken into account that the *namespace declaration* very likely has resulted in numerous namespace nodes, attached to child elements of the element where the namespace was declared. It is likely that the spec intended to specify a "recursive replace" of the resulting namespace nodes of a namespace declaration, and this is what the corrected text suggests. The original text is mixing terminology, hard to read, and ambiguous in its meaning.

If the spec text instead tried to specify that really only this one namespace node should be changed, then this can lead to rather strange effects in the resulting document, since the XPath tree now has "orphan" namespace nodes, which then need to be serialized and namespace declarations in locations where previously no namespace declarations occurred.

One way or the other, this ambiguity needs to be clarified to make the spec easier to read and implement.

Report New Errata



Advanced Search