datatracker.ietf.org
Sign in
Version 5.6.2.p2, 2014-07-24
Report a bug

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

Document type: RFC - Proposed Standard (September 2008; Errata)
Document stream: IETF
Last updated: 2013-03-02
Other versions: plain text, pdf, html

IETF State: (None)
Consensus: Unknown
Document shepherd: No shepherd assigned

IESG State: RFC 5261 (Proposed Standard)
Responsible AD: Jon Peterson
Send notices to: simple-chairs@tools.ietf.org

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

[include full document text]