Subject: [Simple] [Technical Errata Reported] RFC5261 (3478)

From: RFC Errata System <[email-masked]>
Date: Thu, 7 Feb 2013 07:40:41 -0800 (PST)

The following errata report has been submitted for RFC5261,
"An Extensible Markup Language (XML) Patch Operations Framework Utilizing XML Path Language (XPath) Selectors".

--------------------------------------
You may review the report below and at:
http://www.rfc-editor.org/errata_search.php?rfc=5261&eid=3478

--------------------------------------
Type: Technical
Reported by: Erik Wilde <[email-masked]>

Section: 4.4.3

Original Text
-------------
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.

Corrected Text
--------------
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.

Instructions:
-------------
This errata is currently posted as "Reported". If necessary, please
use "Reply All" to discuss whether it should be verified or
rejected. When a decision is reached, the verifying party (IESG)
can log in to change the status and edit the report, if necessary. 

--------------------------------------
RFC5261 (draft-ietf-simple-xml-patch-ops-04)
--------------------------------------
Title               : An Extensible Markup Language (XML) Patch Operations Framework Utilizing XML Path Language (XPath) Selectors
Publication Date    : September 2008
Author(s)           : J. Urpalainen
Category            : PROPOSED STANDARD
Source              : SIP for Instant Messaging and Presence Leveraging Extensions
Area                : Real-time Applications and Infrastructure
Stream              : IETF
Verifying Party     : IESG