An Extensible Markup Language (XML) Patch Operations Framework Utilizing XML Path Language (XPath) Selectors
RFC 5261
|
Document |
Type |
|
RFC - Proposed Standard
(September 2008; Errata)
|
|
Author |
|
Jari Urpalainen
|
|
Last updated |
|
2015-10-14
|
|
Stream |
|
IETF
|
|
Formats |
|
plain text
html
pdf
htmlized
bibtex
|
|
Reviews |
|
|
Stream |
WG state
|
|
(None)
|
|
Document shepherd |
|
No shepherd assigned
|
IESG |
IESG state |
|
RFC 5261 (Proposed Standard)
|
|
Consensus Boilerplate |
|
Unknown
|
|
Telechat date |
|
|
|
Responsible AD |
|
Jon Peterson
|
|
Send notices to |
|
(None)
|
Network Working Group J. Urpalainen
Request for Comments: 5261 Nokia
Category: Standards Track September 2008
An Extensible Markup Language (XML) Patch Operations Framework Utilizing
XML Path Language (XPath) Selectors
Status of This Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Abstract
Extensible Markup Language (XML) documents are widely used as
containers for the exchange and storage of arbitrary data in today's
systems. In order to send changes to an XML document, an entire copy
of the new version must be sent, unless there is a means of
indicating only the portions that have changed. This document
describes an XML patch framework utilizing XML Path language (XPath)
selectors. These selector values and updated new data content
constitute the basis of patch operations described in this document.
In addition to them, with basic <add>, <replace>, and <remove>
directives a set of patches can then be applied to update an existing
XML document.
Table of Contents
1. Introduction ....................................................3
2. Conventions .....................................................3
3. Basic Features and Requirements .................................4
4. Patch Operations ................................................5
4.1. Locating the Target of a Patch .............................6
4.2. Namespace Mangling .........................................6
4.2.1. Namespaces Used in Selectors ........................7
4.2.2. Departures from XPath Requirements ..................7
4.2.3. Namespaces and Added/Changed Content ................8
4.3. <add> Element .............................................10
4.3.1. Adding an Element ..................................11
4.3.2. Adding an Attribute ................................11
4.3.3. Adding a Prefixed Namespace Declaration ............12
4.3.4. Adding Node(s) with the 'pos' Attribute ............12
4.3.5. Adding Multiple Nodes ..............................12
4.4. <replace> Element .........................................13
Urpalainen Standards Track [Page 1]
RFC 5261 Patch Operations September 2008
4.4.1. Replacing an Element ...............................14
4.4.2. Replacing an Attribute Value .......................14
4.4.3. Replacing a Namespace Declaration URI ..............14
4.4.4. Replacing a Comment Node ...........................14
4.4.5. Replacing a Processing Instruction Node ............15
4.4.6. Replacing a Text Node ..............................15
4.5. <remove> Element ..........................................15
4.5.1. Removing an Element ................................15
4.5.2. Removing an Attribute ..............................16
4.5.3. Removing a Prefixed Namespace Declaration ..........16
4.5.4. Removing a Comment Node ............................16
4.5.5. Removing a Processing Instruction Node .............16
4.5.6. Removing a Text Node ...............................16
5. Error Handling .................................................17
5.1. Error Elements ............................................17
6. Usage of Patch Operations ......................................19
7. Usage of Selector Values .......................................19
8. XML Schema Types of Patch Operation Elements ...................19
9. XML Schema of Patch Operation Errors ...........................21
10. IANA Considerations ...........................................23
10.1. URN Sub-Namespace Registration ...........................23
10.2. application/patch-ops-error+xml MIME Type ................24
10.3. Patch-Ops-Types XML Schema Registration ..................25
10.4. Patch-Ops-Error XML Schema Registration ..................25
11. Security Considerations .......................................26
12. Acknowledgments ...............................................26
13. References ....................................................26
13.1. Normative References .....................................26
13.2. Informative References ...................................28
Appendix A. Informative Examples .................................29
A.1. Adding an Element .........................................29
Show full document text