1 / 7

Partial PIDF format-02

Jari Urpalainen Nokia Research Center 6.11.2004. Partial PIDF format-02. PIDF diff. “run diff, apply patch” model, i.e. this format patches the full PIDF document which is always the reference allowed operations: add, remove and replace which are applied in the given order.

min
Download Presentation

Partial PIDF format-02

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Jari Urpalainen Nokia Research Center 6.11.2004 Partial PIDF format-02

  2. PIDF diff • “run diff, apply patch” model, i.e. this format patches the full PIDF document which is always the reference • allowed operations: add, remove and replace which are applied in the given order. • create not allowed • two attributes within root node <pidf-diff>: “version” and “entity”.

  3. XPath selections • ABNF syntax is a restricted set of XPath 1.0 • namespace expansion similar to XCAP • namespace uri for a certain prefix is searched from the current document context • if location step has no prefix and a corresponding element with default namespace found == match • selectors point to single elements, attributes and text-node contents • relative location paths • location step conditions contain: attribute value comparisons, text-node content comparisons and positional constraints

  4. PIDF diff operations • <add> • two selectors: “parent” and “sel” • “parent” is used to select a node from the current document. New content is then added onto this found node. • “sel” is used to point to the newly created node. This is used to define e.g. an attribute name or it has to contain a positional constraint if multiple children exist • depending on the “sel” value, the content of <add> element is either plain text or an xml-fragment enclosed with CDATA

  5. PIDF diff operations • <replace> • one attribute: “sel” is used to point to the node the content of which is going to be updated. • content of <replace> same as with <add> • <remove> • one attribute: “sel” is used to point to the node to be deleted.

  6. Error handling • It is an error if any of the add, remove or replace operation fails -> fall back to the full PIDF • PN client can then refresh the subscription • PP server rejects the request with error code and the client retries with full PIDF

  7. <?xml version="1.0" encoding="UTF-8"?> <pidf-diff xmlns="urn:ietf:params:xml:ns:pidf-diff" entity="pres:someone@example.com" version="1"> <add parent="presence" sel="*[4]"> <![CDATA[<tuple id="ert4773"> <status> <basic>open</basic> </status> <contact priority="0.4">mailto:pep@example.com</contact> <note xml:lang="en">This is a new tuple</note> </tuple>]]></add> <replace sel="presence/tuple[@id=&quot;r1230d&quot;]/status/basic/text()">open</replace> <remove sel="presence/tuple[@id=&quot;r1230d&quot;]/status/rs:activity"/> <remove sel="presence/pe:person/pe:status/rs:activities/rs:activity[.=&quot;busy&quot;]"/> <replace sel="presence/tuple[@id=&quot;cg231jcr&quot;]/contact/@priority">0.7</replace> </pidf-diff> Examples

More Related