WWW/2002/ws/ra/edcopies wsfrag.html,1.54,1.55 wsfrag.xml,1.54,1.55

Update of /w3ccvs/WWW/2002/ws/ra/edcopies
In directory hutz:/tmp/cvs-serv31528

Modified Files:
	wsfrag.html wsfrag.xml 
Log Message:
8185 8193


Index: wsfrag.html
===================================================================
RCS file: /w3ccvs/WWW/2002/ws/ra/edcopies/wsfrag.html,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- wsfrag.html	24 Feb 2010 15:04:00 -0000	1.54
+++ wsfrag.html	3 Mar 2010 02:25:15 -0000	1.55
@@ -49,12 +49,14 @@
 &nbsp;&nbsp;&nbsp;2.4 <a href="#extensions">Considerations on the Use of Extensibility Points</a><br/>
 &nbsp;&nbsp;&nbsp;2.5 <a href="#compliance">Compliance</a><br/>
 3 <a href="#fragments">Fragment WS-Transfer Dialect</a><br/>
-&nbsp;&nbsp;&nbsp;3.1 <a href="#Get">Get</a><br/>
-&nbsp;&nbsp;&nbsp;3.2 <a href="#Put">Put</a><br/>
-&nbsp;&nbsp;&nbsp;3.3 <a href="#Delete">Delete</a><br/>
-&nbsp;&nbsp;&nbsp;3.4 <a href="#Create">Create</a><br/>
-4 <a href="#iddiv1_1_779">Examples</a><br/>
-&nbsp;&nbsp;&nbsp;4.1 <a href="#iddiv2_1_782">Examples</a><br/>
+&nbsp;&nbsp;&nbsp;3.1 <a href="#IdResSubset">Identification of a Resource Subset</a><br/>
+&nbsp;&nbsp;&nbsp;3.2 <a href="#FragSer">Fragment Serialization</a><br/>
+&nbsp;&nbsp;&nbsp;3.3 <a href="#Get">Get</a><br/>
+&nbsp;&nbsp;&nbsp;3.4 <a href="#Put">Put</a><br/>
+&nbsp;&nbsp;&nbsp;3.5 <a href="#Delete">Delete</a><br/>
+&nbsp;&nbsp;&nbsp;3.6 <a href="#Create">Create</a><br/>
+4 <a href="#iddiv1_1_1404">Examples</a><br/>
+&nbsp;&nbsp;&nbsp;4.1 <a href="#iddiv2_1_1407">Examples</a><br/>
 5 <a href="#QName">QName Expression Language</a><br/>
 6 <a href="#XPathL1">XPath Level 1 Expression Language</a><br/>
 7 <a href="#XPath10">XPath 1.0 Expression Language</a><br/>
@@ -63,10 +65,10 @@
 &nbsp;&nbsp;&nbsp;8.2 <a href="#InvalidExpression">InvalidExpression</a><br/>
 &nbsp;&nbsp;&nbsp;8.3 <a href="#UnsupportedMode">UnsupportedMode</a><br/>
 9 <a href="#metadata">WS-Fragment Metadata</a><br/>
-&nbsp;&nbsp;&nbsp;9.1 <a href="#iddiv2_1_1401">Fragment Assertion</a><br/>
+&nbsp;&nbsp;&nbsp;9.1 <a href="#iddiv2_1_1939">Fragment Assertion</a><br/>
 10 <a href="#acks">Acknowledgements</a><br/>
 11 <a href="#refs">References</a><br/>
-&nbsp;&nbsp;&nbsp;11.1 <a href="#iddiv2_1_1454">Normative References</a><br/>
+&nbsp;&nbsp;&nbsp;11.1 <a href="#iddiv2_1_1992">Normative References</a><br/>
 </p>
 <h3><a name="appendices" id="appendices"/>Appendices</h3><p class="toc">A <a href="#Appendix_I__E2_80_93_XSD">XML Schema</a><br/>
 B <a href="#changelog">Change Log</a><br/>
@@ -260,7 +262,114 @@
     perform such operations.  This specification only extends but does
     not modify the base WS-Transfer behavior.
    </p><div class="div2">
-<h3><a name="Get" id="Get"/>3.1 Get</h3><p>
+<h3><a name="IdResSubset" id="IdResSubset"/>3.1 Identification of a Resource Subset</h3><p>
+     The WS-Fragment Dialect is used to identify a portion of a resource 
+     representation to update. The WS-Transfer Get and Put operations have 
+     an Expression that allows a requester to specify which subset of the 
+     resource is being modified. Except in the cases listed below, the 
+     Expression MUST evaluate to a single node within the representation. 
+     This avoids any issues that might occur due to updating multiple 
+     portions of a resource within one invocation - in other words, 
+     "batching" is prohibited. There are however a few special cases 
+     that need to be taken into account:
+    </p><ul><li><p>
+       An Expression that evaluates to the root of the resource 
+       representation might not result in any nodes being returned from the 
+       Expression processor. For example, an XPath expression of "/" on an 
+       empty resource would return an empty node-set.  However, to allow 
+       for requesters to specify the root (implying the entire document), 
+       Expression Languages (and supporting services) that wish to 
+       support  this concept might need to make special allowances for this 
+       situation. Each Expression Language would need to call out this 
+       special expression.
+      </p></li><li><p>
+       While WS-Fragment doesn't support batching, there are times when 
+       a requester might need to act upon an entire sequence of elements 
+       (i.e. a list of elements of the same QName that are all siblings). 
+       For example, a requester wanting to delete all children of an 
+       element. Rather than requiring the requester to send a series of 
+       WS-Transfer Put requests to delete each individual child element, 
+       WS-Fragment allows for Expression Languages (and services) to 
+       identify and act upon the sequence as one entity.
+      </p></li></ul><p>
+     If an Expression does evaluate to more than one node then, except for 
+     the cases listed above, the implementation MUST process only the 
+     first selected node.
+    </p><p>
+     For the purposes of this specification, attributes are treated as 
+     single strings - multi-value attributes are not supported.
+    </p></div><div class="div2">
+<h3><a name="FragSer" id="FragSer"/>3.2 Fragment Serialization</h3><p>
+     When using the WS-Fragment Dialect, subsets of resource representations 
+     are serialized into the Get response and Put request messages. To 
+     ensure that the receiver of those messages can unambiguously parse the 
+     data into the proper XML entities, this specification defines the 
+     following rules for serializing XML fragments.
+    </p><p>
+     Expressions MUST evaluate to one of four possible types: a node-set, 
+     a Boolean, a Number or a String. The latter three types are the 
+     results of evaluating a computed expression. When they appear in a 
+     message they are serialized by performing the following conversion and 
+     then wrapping the result in the wsf:Value element: 
+    </p><ul><li><p>Boolean - converted to an xs:boolean</p></li><li><p>Number - converted to an xs:double</p></li><li><p>String - converted to an xs:string</p></li></ul><p>
+     A node-set is zero or more elements, attributes or text values of 
+     elements. A node-set is serialized into XML by concatenating each 
+     node and enclosing it in the wsf:Value wrapper XML element for which 
+     schema validation is suppressed. Element nodes in a node-set are 
+     serialized directly into their XML representation. For attributes 
+     and text nodes in the node-set, a wrapper element is used to 
+     enclose these values to distinguish them from other such nodes in 
+     the serialized result. 
+    </p><p>
+     Attribute nodes in XPath are represented in the following form:
+    </p><div class="exampleOuter"><div class="exampleInner"><pre>name="value"</pre></div></div><p>
+     Serialization of an attribute node separates the name from
+     the value using the following element:
+    </p><div class="exampleOuter"><div class="exampleInner"><pre>(01) &lt;wsf:AttributeNode name="<em>xs:QName</em>"&gt;
+(02)   <em>attribute value</em>
+(03) &lt;/wsf:AttributeNode&gt;</pre></div></div><p>
+     The following describes additional constraints on the outline 
+     listed above:
+    </p><dl><dt class="label"> wsf:AttributeNode </dt><dd><p>
+        This element is used to serialize an attribute node in a
+        node-set and MUST contain the value portion of the attribute node.
+       </p></dd><dt class="label"> wsf:AttributeNode/@name </dt><dd><p>
+        This attribute MUST be the qualified name of the attribute node.
+       </p></dd></dl><p>
+     Text nodes are serialized in the following form:
+    </p><div class="exampleOuter"><div class="exampleInner"><pre>(01) &lt;wsf:TextNode&gt;
+(02)   <em>text value</em>
+(03) &lt;/wsf:TextNode&gt;</pre></div></div><p>
+     The following describes additional constraints on the
+     outline listed above:
+    </p><dl><dt class="label"> wsf:TextNode </dt><dd><p>
+        This element is used to serialize a text node in a node-set
+        and MUST contain the text value.
+       </p></dd></dl><p>Given the following XML as an example document.</p><div class="exampleOuter"><div class="exampleInner"><pre>(01) &lt;a xmlns="example"&gt;
+(02)   &lt;b&gt;1&lt;/b&gt;
+(03)   &lt;c x="y"&gt;2&lt;/c&gt;
+(04) &lt;/a&gt;</pre></div></div><p>
+     The result of the XPath "/a/b | /a/b/text() | /a/c/@x" would
+     be serialized as the following:
+    </p><div class="exampleOuter"><div class="exampleInner"><pre>(01) &lt;wsf:Value&gt;
+(02)   &lt;b&gt;1&lt;/b&gt;
+(03)   &lt;wsf:TextNode&gt;1&lt;/wsf:TextNode&gt;
+(04)   &lt;wsf:AttributeNode name="x"&gt;y&lt;/wsf:AttributeNode&gt;
+(05) &lt;/wsf:Value&gt;</pre></div></div><p>The nodes in the node-set MAY be serialized in any order.</p><p>
+     The namespace bindings are evaluated against any namespace
+     declarations that are in scope where the expression appears within 
+     the SOAP message.
+     Note that the evaluation of expressions that rely on such context
+     dependent bindings is fragile in the face of transformations that alter
+     namespace prefixes. Such transformations might occur during the
+     transmission, processing, storage, or retrieval of a request. Clients
+     that wish to isolate expressions from the effects of any changes to the
+     namespace prefixes in the containing SOAP message are advised to
+     construct expressions in a manner that avoids the use of namespace
+     prefixes. For example, use an expression such as
+     "/a[namespace-uri()='http://www.example.com']" not "/ns1:a".
+    </p></div><div class="div2">
+<h3><a name="Get" id="Get"/>3.3 Get</h3><p>
      To retrieve a subset of a resource
      a client MUST specify the WS-Fragment Dialect IRI in the wst:Get request.
     </p><p>
@@ -314,7 +423,7 @@
      Other components of the outline above are not further constrained 
      by this specification.
     </p></div><div class="div2">
-<h3><a name="Put" id="Put"/>3.2 Put</h3><p>
+<h3><a name="Put" id="Put"/>3.4 Put</h3><p>
      To update a subset of a resource a client MUST specify the WS-Fragment
      IRI in the wst:Put request.
     </p><p>
@@ -359,49 +468,90 @@
         A resource MUST generate a wsf:UnsupportedMode fault if the specified 
         Mode is not supported.
        </p></dd><dt class="label"><b>[Body]</b>/wst:Put/wsf:Fragment/wsf:Expression@Mode="http://www.w3.org/2002/ws/ra/edcopies/ws-fra/Modes/Replace" </dt><dd><p>
-        When the Mode attribute is set to a value of 
-        "http://www.w3.org/2002/ws/ra/edcopies/ws-fra/Modes/Replace" the resource 
-        representation specified within the Value element MUST replace the 
-        entire resource representation referenced by the children of the 
-        Expression element, if it exists.
-       </p></dd><dt class="label"><b>[Body]</b>/wst:Put/wsf:Fragment/wsf:Expression@Mode="http://www.w3.org/2002/ws/ra/edcopies/ws-fra/Modes/Insert" </dt><dd><p>
-        When the Mode attribute is set to a value of 
-        "http://www.w3.org/2002/ws/ra/edcopies/ws-fra/Modes/Insert" the resource 
-        representation specified within the Value element MUST be added to 
-        the resource representation. If the expression targets a repeated 
-        element (maxOccurs &gt; 1), the fragment MUST be added at the end. If 
-        the expression targets a non-repeated element (maxOccurrs = 1) that 
-        already exists, the resource MUST generate a 
-        wst:InvalidRepresentation fault. If the expression targets an 
-        existing item of a repeated element, the fragment MUST be added 
-        before the existing item. 
+        This Mode value indicates that the children of the Value element 
+        MUST be added to the resource representation in place of the 
+        fragment referenced by the children of the Expression element.
+       </p><p>
+        This Mode value has the net effect of doing a "delete" on the 
+        referenced fragment, followed by an "insert" on the fragment's 
+        parent. If the referenced fragment is already absent then 
+        the "insert" operation is still performed.
+       </p><p>
+        If the Value element is not present then this Mode MUST simply remove 
+        the referenced fragment. If the fragment is already absent, or if 
+        the Expression evaluates to an empty fragment, then this operation 
+        MUST have no effect. If the implementation is schema aware
+        and it detects that the Expression is not valid per the schema then a
+        wsf:InvalidExpression fault MUST be generated.
+       </p><p>
+        When this Mode value is used the Value element MUST be present.
+       </p></dd><dt class="label"><b>[Body]</b>/wst:Put/wsf:Fragment/wsf:Expression@Mode="http://www.w3.org/2002/ws/ra/edcopies/ws-fra/Modes/Add" </dt><dd><p>
+        This Mode value indicates that the children of the Value element 
+        MUST be added to the resource representation relative to the 
+        fragment referenced by the children of the Expression element.
+       </p><p>
+        If the Value element contains an attribute node then the attribute 
+        MUST be added to the referenced element. If an attribute with 
+        that name already exists then a wst:InvalidRepresentation fault 
+        MUST be generated.
+       </p><p>
+        If the Value element contains a fragment that is not an 
+        attribute node, the children of the Value element are added as 
+        children to the referenced fragment.
+       </p><p>
+        When adding a child element and a child element of that QName 
+        already exists, the new element MUST be added to the end of that 
+        sequence of child elements. If the requester wants to ensure 
+        that only a single instance of that child element is present 
+        it can use the "Replace" instead.
+       </p><p>
+        While schema validation is not required of resource managers, 
+        since resources are only allowed to have a single root element, 
+        attempts to "Add" a second root element MUST generate a 
+        wst:InvalidRepresentation fault.
+       </p><p>
+        When this Mode value is used the Value element MUST be present.
+       </p></dd><dt class="label"><b>[Body]</b>/wst:Put/wsf:Fragment/wsf:Expression@Mode="http://www.w3.org/2002/ws/ra/edcopies/ws-fra/Modes/InsertBefore" </dt><dd><p>
+        This Mode value indicates that the children of the Value element 
+        MUST be inserted immediately before (as a sibling to) the fragment 
+        referenced by the children of the Expression element. Note, this 
+        Mode MUST NOT be used for attributes.
+       </p><p>
+        If the implementation is schema aware and it detects that the 
+        Expression does not reference a sequence then it MUST generate 
+        a wst:InvalidRepresentation fault. 
+       </p><p>
+        When this Mode value is used the Value element MUST be present.
+       </p></dd><dt class="label"><b>[Body]</b>/wst:Put/wsf:Fragment/wsf:Expression@Mode="http://www.w3.org/2002/ws/ra/edcopies/ws-fra/Modes/InsertAfter" </dt><dd><p>
+        This Mode value indicates that the children of the Value element 
+        MUST be inserted immediately after (as a sibling to) the fragment 
+        referenced by the children of the Expression element. Note, this 
+        Mode MUST NOT be used for attributes.
+       </p><p>
+        If the implementation is schema aware and it detects that the 
+        Expression does not reference a sequence then it MUST generate 
+        a wst:InvalidRepresentation fault. 
+       </p><p>
+        When this Mode value is used the Value element MUST be present.
        </p></dd><dt class="label"><b>[Body]</b>/wst:Put/wsf:Fragment/wsf:Expression@Mode="http://www.w3.org/2002/ws/ra/edcopies/ws-fra/Modes/Remove" </dt><dd><p>
         When the Mode attribute is set to a value of 
         "http://www.w3.org/2002/ws/ra/edcopies/ws-fra/Modes/Remove" the resource 
         representation referenced by the children of the Expression element
         MUST be deleted from the resource representation. 
        </p><p>
-        Note: the Value element MUST NOT be present if this attribute
-        has a value of "http://www.w3.org/2002/ws/ra/edcopies/ws-fra/Modes/Remove".
+        When this Mode value is used the Value element MUST NOT be present.
        </p></dd><dt class="label"><b>[Body]</b>/wst:Put/wsf:Fragment/wsf:Value </dt><dd><p>
         This OPTIONAL element contains the fragment resource representation
-        corresponding to the subset of the resource identified by the 
-        wsf:Expression element.
+        to be added to the resource representation.
         If the contents of this element are invalid, a 
         wst:InvalidRepresentation fault MUST be generated.
        </p><p>
-        When Mode is "http://www.w3.org/2002/ws/ra/edcopies/ws-fra/Modes/Insert"
-        or "http://www.w3.org/2002/ws/ra/edcopies/ws-fra/Modes/Replace", any
-        optional values (element or attributes) within this subset that are 
+        Any optional values (element or attributes) within this subset that are 
         not specified in the Value element MUST be set to a resource-specific 
         default value.
        </p><p>
-        This element MUST NOT be present if the Mode attribute has a value 
-        of "http://www.w3.org/2002/ws/ra/edcopies/ws-fra/Modes/Remove". This element 
-        MUST be present if the Mode attribute has a value of either
-        "http://www.w3.org/2002/ws/ra/edcopies/ws-fra/Modes/Replace" or 
-        "http://www.w3.org/2002/ws/ra/edcopies/ws-fra/Modes/Insert". When present, 
-        this element MAY be empty.
+        The children of this element MUST be serialized according to the 
+        rules defined in <a href="#FragSer"><b>3.2 Fragment Serialization</b></a>.
        </p></dd></dl><p>
      If the resource accepts a Put request, it MUST reply with a response of
      the following form:
@@ -416,17 +566,27 @@
     <em>xs:any</em> *
   &lt;/wst:PutResponse&gt;</pre></div></div><p>
      There are no additional constraints beyond what WS-Transfer defines.
-    </p></div><div class="div2">
-<h3><a name="Delete" id="Delete"/>3.3 Delete</h3><p>
+    </p><p>
+     The following table elaborates on the expected behavior of a 
+     WS-Fragment Put request using the XPath Level 1 language.
+    </p><p>
+     Given a resource whose schema is defined as:
+    </p><div class="exampleOuter"><div class="exampleInner"><pre>&lt;a foo="xs:integer"? bar="xs:integer"? &gt;
+  ( &lt;b&gt; &lt;c/&gt; &lt;/b&gt; * | &lt;c/&gt; ) 
+&lt;/a&gt;</pre></div></div><p>
+     Note: for the sake of clarity, some element names have a ' or " to 
+     indicate that it is a different instance of that type of element.
+    </p><table border="1"><tbody><tr><td>Initial Representation</td><td>@Mode</td><td>Expression</td><td>Value</td><td>Final Represenation</td></tr><tr><td/><td>Add</td><td>/</td><td>&lt;a/&gt;</td><td>&lt;a/&gt;</td></tr><tr><td/><td>Replace</td><td>/</td><td>&lt;a/&gt;</td><td>&lt;a/&gt;</td></tr><tr><td>&lt;a/&gt;</td><td>Add</td><td>/</td><td>&lt;a'/&gt;</td><td>fault</td></tr><tr><td>&lt;a/&gt;</td><td>Replace</td><td>/a</td><td>&lt;a'/&gt;</td><td>&lt;a'/&gt;</td></tr><tr><td>&lt;a/&gt;</td><td>Add</td><td>/a</td><td>&lt;wsf:AttributeNode name="foo"&gt;1&lt;/wsf:AttributeNode&gt;</td><td>&lt;a foo="1"/&gt;</td></tr><tr><td>&lt;a foo="1"/&gt;</td><td>Add</td><td>/a</td><td>&lt;wsf:AttributeNode name="foo"&gt;2&lt;/wsf:AttributeNode&gt;</td><td>fault</td></tr><tr><td>&lt;a foo="1"/&gt;</td><td>Replace</td><td>/a@foo</td><td>&lt;wsf:AttributeNode name="foo"&gt;2&lt;/wsf:AttributeNode&gt;</td><td>&lt;a foo="2"/&gt;</td></tr><tr><td>&lt;a foo="1"/&gt;</td><td>Replace</td><td>/a@foo</td><td>&lt;wsf:AttribueNode name="bar"&gt;2&lt;/wsf:AttributeNode&gt;</td><td>&lt;a bar="2"/&gt;</td></tr><tr><td>&lt;a/&gt;</td><td>Replace</td><td>/a@foo</td><td>&lt;wsf:AttributeNode name="bar"&gt;2&lt;/wsf:AttributeNode&gt;</td><td>&lt;a bar="2"/&gt;</td></tr><tr><td>&lt;a foo="1"/&gt;</td><td>Remove</td><td>/a@foo</td><td/><td>&lt;a/&gt;</td></tr><tr><td>&lt;a/&gt;</td><td>Add</td><td>/a</td><td>&lt;b/&gt;</td><td>&lt;a&gt; &lt;b/&gt; &lt;/a&gt;</td></tr><tr><td>&lt;a&gt; &lt;b/&gt; &lt;/a&gt;</td><td>Add</td><td>/a</td><td>&lt;b'/&gt;</td><td>&lt;a&gt; &lt;b/&gt; &lt;b'/&gt; &lt;/a&gt;</td></tr><tr><td>&lt;a&gt; &lt;b/&gt; &lt;/a&gt;</td><td>Replace</td><td>/a/b</td><td>&lt;b'/&gt;</td><td>&lt;a&gt; &lt;b'/&gt; &lt;/a&gt;</td></tr><tr><td>&lt;a/&gt;</td><td>Replace</td><td>/a/b</td><td>&lt;b/&gt;</td><td>&lt;a&gt; &lt;b/&gt; &lt;/a&gt;</td></tr><tr><td>&lt;a&gt; &lt;b/&gt; &lt;b'&gt; &lt;/a&gt;</td><td>InsertAfter</td><td>/a/b or /a/b[last()]</td><td>&lt;b"/&gt;</td><td>&lt;a&gt; &lt;b/&gt; &lt;b'&gt; &lt;b"/&gt; &lt;/a&gt</td></tr><tr><td>&lt;a&gt; &lt;b/&gt; &lt;b'&gt; &lt;/a&gt;</td><td>InsertBefore</td><td>/a/b or /a/b[1]</td><td>&lt;b"/&gt;</td><td>&lt;a&gt; &lt;b"/&gt; &lt;b&gt; &lt;b'/&gt; &lt;/a&gt;</td></tr><tr><td>&lt;a&gt; &lt;b/&gt; &lt;b'&gt; &lt;/a&gt;</td><td>Replace</td><td>/a/b</td><td>&lt;b"/&gt;</td><td>&lt;a&gt; &lt;b"/&gt; &lt;/a&gt;</td></tr><tr><td>&lt;a&gt; &lt;b/&gt; &lt;b'&gt; &lt;/a&gt;</td><td>Replace</td><td>/a/b[1]</td><td>&lt;b"/&gt;</td><td>&lt;a&gt; &lt;b"/&gt; &lt;b'&gt; &lt;/a&gt;</td></tr><tr><td>&lt;a&gt; &lt;b/&gt; &lt;/a&gt;</td><td>Remove</td><td>/a/b</td><td/><td>&lt;a/&gt;</td></tr><tr><td>&lt;a&gt; &lt;b/&gt; &lt;b'&gt; &lt;/a&gt;</td><td>Remove</td><td>/a/b</td><td/><td>&lt;a/&gt;</td></tr><tr><td>&lt;a&gt; &lt;b/&gt; &lt;b'&gt; &lt;/a&gt;</td><td>Remove</td><td>/a/b[1]</td><td/><td>&lt;a&gt; &lt;b'&gt; &lt;/a&gt;</td></tr><tr><td>&lt;a&gt; &lt;b/&gt; &lt;b'&gt; &lt;/a&gt;</td><td>Replace</td><td>/a/b</td><td>&lt;c/&gt;</td><td>&lt;a&gt; &lt;c&gt; &lt;/a&gt;</td></tr></tbody></tabl></div><div class="div2">
+<h3><a name="Delete" id="Delete"/>3.5 Delete</h3><p>
      This specification does not extend the Delete operation defined in
      WS-Transfer.
     </p></div><div class="div2">
-<h3><a name="Create" id="Create"/>3.4 Create</h3><p>
+<h3><a name="Create" id="Create"/>3.6 Create</h3><p>
      This specification does not extend the Create operation defined in
      WS-Transfer.
     </p></div></div><div class="div1">
-<h2><a name="iddiv1_1_779" id="iddiv1_1_779"/>4 Examples</h2><div class="div2">
-<h3><a name="iddiv2_1_782" id="iddiv2_1_782"/>4.1 Examples</h3><p>
+<h2><a name="iddiv1_1_1404" id="iddiv1_1_1404"/>4 Examples</h2><div class="div2">
+<h3><a name="iddiv2_1_1407" id="iddiv2_1_1407"/>4.1 Examples</h3><p>
      In the following examples, and Expression Language definitions,
      the following representation of a resource is used for
      informational purposes:
@@ -655,31 +815,10 @@
     returns a
     node-set containing a single element node which serializes directly:
    </p><div class="exampleOuter"><div class="exampleInner"><pre>(01) &lt;b&gt; &lt;c d="30"&gt; 20 &lt;/c&gt; &lt;/b&gt;</pre></div></div><p>
-    In the case of a Put operation, if the XPath expression selects more
-    than one node, the implementation MUST process only the first selected
-    node.  This allows simple implementations to avoid the overhead of
-    checking the remainder of the resource document for a possible match.
-   </p><p>
     Conformant implementations MAY supply additional functions
     and capabilities, but MUST adhere to the minimum behavior described above.
    </p><p>
     The XPath Level 1 language does not support computed values. 
-    Text and attribute nodes MUST be serialized in the GetResponse
-    message using the same serialization as for the XPath 1.0 language.
-    This serialization mechanism MUST NOT be used in the PutRequest message.
-   </p><p>
-    The namespace bindings are evaluated against any namespace
-    declarations that are in scope where the expression appears within the SOAP
-    message.
-    Note that the evaluation of expressions that rely on such context
-    dependent bindings is fragile in the face of transformations that alter
-    namespace prefixes. Such transformations might occur during the
-    transmission, processing, storage, or retrieval of a request. Clients
-    that wish to isolate expressions from the effects of any changes to the
-    namespace prefixes in the containing SOAP message are advised to
-    construct expressions in a manner that avoids the use of namespace
-    prefixes. For example, use an expression such as
-    "/a[namespace-uri()='http://www.example.com']" not "/ns1:a".
    </p></div><div class="div1">
 <h2><a name="XPath10" id="XPath10"/>7 XPath 1.0 Expression Language</h2><p>
     The XPath 1.0 expression language uses an XPath to reference specific
@@ -708,82 +847,8 @@
     Implementations that support the full XPath 1.0 language MUST
     support the XPath Level 1 language.
    </p><p>
-    In the case of a Put operation if the XPath expression selects more 
-    than one node, the implementation MUST process only the first selected 
-    node. This allows simple implementations to avoid the overhead of 
-    checking the remainder of the resource document for a possible match. 
-   </p><p>
-    The remainder of this section defines an XML serialization mechanism 
-    that MUST be used when constructing a GetResponse message. Since the 
-    PutRequest message MUST NOT be used to modify more than one target, 
-    these serialization rules MUST NOT be used in a PutRequest message.
-   </p><p>
-    Expressions MUST evaluate to one of four
-    possible types: a node-set, a Boolean, a number or a string. The 
-    latter three types are the results of evaluating a computed expression. 
-    When they appear in a GetResponse message they are serialized
-    by performing the following conversion and then wrapping the result in 
-    the wsf:Value element:
-   </p><ul><li><p>Boolean - converted to an xs:boolean</p></li><li><p>string - convert to an xs:string</p></li><li><p>number - convert to an xs:double</p></li></ul><p>
-    A node-set is zero or more elements, attributes or text
-    values of elements. A node-set is serialized into XML by 
-    concatenating each
-    node and enclosing it in the wsf:Value wrapper XML element for which 
-    schema
-    validation is suppressed. Element nodes in a node-set are serialized 
-    directly
-    into their XML representation. For attributes and text nodes in the 
-    node-set,
-    a wrapper element is used to enclose these values to distinguish them from
-    other such nodes in the serialized result.
-   </p><p>
-    Attribute nodes in XPath are represented in the following form:
-   </p><div class="exampleOuter"><div class="exampleInner"><pre>name="value"</pre></div></div><p>
-    Serialization of an attribute node separates the name from
-    the value using the following element:
-   </p><div class="exampleOuter"><div class="exampleInner"><pre>(01) &lt;wsf:AttributeNode name="<em>xs:QName</em>"&gt;
-(02)   <em>attribute value</em>
-(03) &lt;/wsf:AttributeNode&gt;</pre></div></div><p>
-    The following describes additional constraints on the outline 
-    listed above:
-   </p><dl><dt class="label"> wsf:AttributeNode </dt><dd><p>
-       This element is used to serialize an attribute node in a
-       node-set and MUST contain the value portion of the attribute node.
-      </p></dd><dt class="label"> wsf:AttributeNode/@name </dt><dd><p>
-       This attribute MUST be the qualified name of the attribute node.
-      </p></dd></dl><p>
-    Text nodes are serialized in the following form:
-   </p><div class="exampleOuter"><div class="exampleInner"><pre>(01) &lt;wsf:TextNode&gt;
-(02)   <em>text value</em>
-(03) &lt;/wsf:TextNode&gt;</pre></div></div><p>
-    The following describes additional constraints on the
-    outline listed above:
-   </p><dl><dt class="label"> wsf:TextNode </dt><dd><p>
-       This element is used to serialize a text node in a node-set
-       and MUST contain the text value.
-      </p></dd></dl><p>Given the following XML as an example document.</p><div class="exampleOuter"><div class="exampleInner"><pre>(01) &lt;a xmlns="example"&gt;
-(02)   &lt;b&gt;1&lt;/b&gt;
-(03)   &lt;c x="y"&gt;2&lt;/c&gt;
-(04) &lt;/a&gt;</pre></div></div><p>
-    The result of the XPath "/a/b | /a/b/text() | /a/c/@x" would
-    be serialized as the following:
-   </p><div class="exampleOuter"><div class="exampleInner"><pre>(01) &lt;wsf:Value&gt;
-(02)   &lt;b&gt;1&lt;/b&gt;
-(03)   &lt;wsf:TextNode&gt;1&lt;/wsf:TextNode&gt;
-(04)   &lt;wsf:AttributeNode name="x"&gt;y&lt;/wsf:AttributeNode&gt;
-(05) &lt;/wsf:Value&gt;</pre></div></div><p>The nodes in the node-set MAY be serialized in any order.</p><p>
-    The namespace bindings are evaluated against any namespace
-    declarations that are in scope where the expression appears within the SOAP
-    message.
-    Note that the evaluation of expressions that rely on such context
-    dependent bindings is fragile in the face of transformations that alter
-    namespace prefixes. Such transformations might occur during the
-    transmission, processing, storage, or retrieval of a request. Clients
-    that wish to isolate expressions from the effects of any changes to the
-    namespace prefixes in the containing SOAP message are advised to
-    construct expressions in a manner that avoids the use of namespace
-    prefixes. For example, use an expression such as
-    "/a[namespace-uri()='http://www.example.com']" not "/ns1:a".
+    The serialization and context rules defined by the XPath Level 1 
+    language apply to the XPath 1.0 language as well.
    </p></div><div class="div1">
 <h2><a name="Faults" id="Faults"/>8 Faults</h2><p>
     All fault messages defined in this specification MUST be sent
@@ -860,7 +925,7 @@
     doing so the endpoint is indicating that the corresponding WS-Fragment
     features are supported by that endpoint.
    </p><div class="div2">
-<h3><a name="iddiv2_1_1401" id="iddiv2_1_1401"/>9.1 Fragment Assertion</h3><p>
+<h3><a name="iddiv2_1_1939" id="iddiv2_1_1939"/>9.1 Fragment Assertion</h3><p>
      The mechanism for indicating that a binding or endpoint conforms to the
      WS-Fragment specification is through the use of the Web Services
      Policy - Framework <a href="#wspolicy">[WS-Policy]</a> and Web Services Policy -
@@ -935,7 +1000,7 @@
      Yves Lafon (W3C/ERCIM).
    </p></div><div class="div1">
 <h2><a name="refs" id="refs"/>11 References</h2><div class="div2">
-<h3><a name="iddiv2_1_1454" id="iddiv2_1_1454"/>11.1 Normative References</h3><dl><dt class="label"><a name="RFC2119" id="RFC2119"/>RFC 2119</dt><dd><a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>
+<h3><a name="iddiv2_1_1992" id="iddiv2_1_1992"/>11.1 Normative References</h3><dl><dt class="label"><a name="RFC2119" id="RFC2119"/>RFC 2119</dt><dd><a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>
         Key words for use in RFCs to Indicate Requirement Levels
        </cite></a>
        , S. Bradner, Author.
@@ -1104,4 +1169,6 @@
        <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=8191">8191</a></td></tr><tr><td> 2010/01/28 </td><td> DD </td><td> Added resolution of issue 
        <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=8196">8196</a></td></tr><tr><td> 2010/02/10 </td><td> DD </td><td> Added resolution of issue 
        <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=8160">8160</a></td></tr><tr><td> 2010/02/10 </td><td> DD </td><td> Added resolution of issue 
-       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=9032">9032</a></td></tr></tbody></table></div></div></body></html>
\ No newline at end of file
+       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=9032">9032</a></td></tr><tr><td> 2010/03/02 </td><td> DD </td><td> Added resolution of issue 
+       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=8185">8185</a>,
+       <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=8193">8193</a></td></tr></tbody></table></div></div></body></html>
\ No newline at end of file

Index: wsfrag.xml
===================================================================
RCS file: /w3ccvs/WWW/2002/ws/ra/edcopies/wsfrag.xml,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- wsfrag.xml	24 Feb 2010 15:04:00 -0000	1.54
+++ wsfrag.xml	3 Mar 2010 02:25:15 -0000	1.55
@@ -507,6 +507,219 @@
     not modify the base WS-Transfer behavior.
    </p>
 
+   <div2 id="IdResSubset">
+    <head>Identification of a Resource Subset</head>
+
+    <p>
+     The WS-Fragment Dialect is used to identify a portion of a resource 
+     representation to update. The WS-Transfer Get and Put operations have 
+     an Expression that allows a requester to specify which subset of the 
+     resource is being modified. Except in the cases listed below, the 
+     Expression MUST evaluate to a single node within the representation. 
+     This avoids any issues that might occur due to updating multiple 
+     portions of a resource within one invocation - in other words, 
+     "batching" is prohibited. There are however a few special cases 
+     that need to be taken into account:
+    </p>
+
+    <ulist>
+     <item>
+      <p>
+       An Expression that evaluates to the root of the resource 
+       representation might not result in any nodes being returned from the 
+       Expression processor. For example, an XPath expression of "/" on an 
+       empty resource would return an empty node-set.  However, to allow 
+       for requesters to specify the root (implying the entire document), 
+       Expression Languages (and supporting services) that wish to 
+       support  this concept might need to make special allowances for this 
+       situation. Each Expression Language would need to call out this 
+       special expression.
+      </p>
+     </item>
+
+     <item>
+      <p>
+       While WS-Fragment doesn't support batching, there are times when 
+       a requester might need to act upon an entire sequence of elements 
+       (i.e. a list of elements of the same QName that are all siblings). 
+       For example, a requester wanting to delete all children of an 
+       element. Rather than requiring the requester to send a series of 
+       WS-Transfer Put requests to delete each individual child element, 
+       WS-Fragment allows for Expression Languages (and services) to 
+       identify and act upon the sequence as one entity.
+      </p>
+     </item>
+    </ulist>
+
+    <p>
+     If an Expression does evaluate to more than one node then, except for 
+     the cases listed above, the implementation MUST process only the 
+     first selected node.
+    </p>
+
+    <p>
+     For the purposes of this specification, attributes are treated as 
+     single strings - multi-value attributes are not supported.
+    </p>
+   </div2>
+
+   <div2 id="FragSer">
+    <head>Fragment Serialization</head>
+
+    <p>
+     When using the WS-Fragment Dialect, subsets of resource representations 
+     are serialized into the Get response and Put request messages. To 
+     ensure that the receiver of those messages can unambiguously parse the 
+     data into the proper XML entities, this specification defines the 
+     following rules for serializing XML fragments.
+    </p>
+
+    <p>
+     Expressions MUST evaluate to one of four possible types: a node-set, 
+     a Boolean, a Number or a String. The latter three types are the 
+     results of evaluating a computed expression. When they appear in a 
+     message they are serialized by performing the following conversion and 
+     then wrapping the result in the wsf:Value element: 
+    </p>
+
+    <ulist>
+     <item>
+      <p>Boolean - converted to an xs:boolean</p>
+     </item>
+
+     <item>
+      <p>Number - converted to an xs:double</p>
+     </item>
+
+     <item>
+      <p>String - converted to an xs:string</p>
+     </item>
+    </ulist>
+
+    <p>
+     A node-set is zero or more elements, attributes or text values of 
+     elements. A node-set is serialized into XML by concatenating each 
+     node and enclosing it in the wsf:Value wrapper XML element for which 
+     schema validation is suppressed. Element nodes in a node-set are 
+     serialized directly into their XML representation. For attributes 
+     and text nodes in the node-set, a wrapper element is used to 
+     enclose these values to distinguish them from other such nodes in 
+     the serialized result. 
+    </p>
+
+    <p>
+     Attribute nodes in XPath are represented in the following form:
+    </p>
+    
+    <example>
+     <eg>name="value"</eg>
+    </example>
+     
+    <p>
+     Serialization of an attribute node separates the name from
+     the value using the following element:
+    </p>
+ 
+    <example>
+     <eg>(01) &lt;wsf:AttributeNode name="<emph>xs:QName</emph>">
+(02)   <emph>attribute value</emph>
+(03) &lt;/wsf:AttributeNode&gt;</eg>
+    </example>
+     
+    <p>
+     The following describes additional constraints on the outline 
+     listed above:
+    </p>
+    
+    <glist>
+     <gitem>
+      <label> wsf:AttributeNode </label>
+      <def>
+       <p>
+        This element is used to serialize an attribute node in a
+        node-set and MUST contain the value portion of the attribute node.
+       </p>
+      </def>
+     </gitem>
+ 
+     <gitem>
+      <label> wsf:AttributeNode/@name </label>
+      <def>
+       <p>
+        This attribute MUST be the qualified name of the attribute node.
+       </p>
+      </def>
+     </gitem>
+    </glist>
+    
+    <p>
+     Text nodes are serialized in the following form:
+    </p>
+ 
+    <example>
+     <eg>(01) &lt;wsf:TextNode&gt;
+(02)   <emph>text value</emph>
+(03) &lt;/wsf:TextNode&gt;</eg>
+    </example>
+     
+    <p>
+     The following describes additional constraints on the
+     outline listed above:
+    </p>
+     
+    <glist>
+     <gitem>
+      <label> wsf:TextNode </label>
+      <def>
+       <p>
+        This element is used to serialize a text node in a node-set
+        and MUST contain the text value.
+       </p>
+      </def>
+     </gitem>
+    </glist>
+    
+    <p>Given the following XML as an example document.</p>
+     
+    <example>
+     <eg>(01) &lt;a xmlns="example"&gt;
+(02)   &lt;b&gt;1&lt;/b&gt;
+(03)   &lt;c x="y"&gt;2&lt;/c&gt;
+(04) &lt;/a&gt;</eg>
+    </example>
+     
+    <p>
+     The result of the XPath "/a/b | /a/b/text() | /a/c/@x" would
+     be serialized as the following:
+    </p>
+    
+    <example>
+     <eg>(01) &lt;wsf:Value&gt;
+(02)   &lt;b&gt;1&lt;/b&gt;
+(03)   &lt;wsf:TextNode&gt;1&lt;/wsf:TextNode&gt;
+(04)   &lt;wsf:AttributeNode name="x"&gt;y&lt;/wsf:AttributeNode&gt;
+(05) &lt;/wsf:Value&gt;</eg>
+    </example>
+     
+    <p>The nodes in the node-set MAY be serialized in any order.</p>
+ 
+    <p>
+     The namespace bindings are evaluated against any namespace
+     declarations that are in scope where the expression appears within 
+     the SOAP message.
+     Note that the evaluation of expressions that rely on such context
+     dependent bindings is fragile in the face of transformations that alter
+     namespace prefixes. Such transformations might occur during the
+     transmission, processing, storage, or retrieval of a request. Clients
+     that wish to isolate expressions from the effects of any changes to the
+     namespace prefixes in the containing SOAP message are advised to
+     construct expressions in a manner that avoids the use of namespace
+     prefixes. For example, use an expression such as
+     "/a[namespace-uri()='http://www.example.com']" not "/ns1:a".
+    </p>
+
+   </div2>
+
    <div2 id="Get">
     <head>Get</head>
     <p>
@@ -704,29 +917,104 @@
       <label> <kw>[Body]</kw>/wst:Put/wsf:Fragment/wsf:Expression@Mode="http://www.w3.org/&wsfra.nsprefix;/ws-fra/Modes/Replace" </label>
       <def>
        <p>
-        When the Mode attribute is set to a value of 
-        "http://www.w3.org/&wsfra.nsprefix;/ws-fra/Modes/Replace" the resource 
-        representation specified within the Value element MUST replace the 
-        entire resource representation referenced by the children of the 
-        Expression element, if it exists.
+        This Mode value indicates that the children of the Value element 
+        MUST be added to the resource representation in place of the 
+        fragment referenced by the children of the Expression element.
+       </p>
+       <p>
+        This Mode value has the net effect of doing a "delete" on the 
+        referenced fragment, followed by an "insert" on the fragment's 
+        parent. If the referenced fragment is already absent then 
+        the "insert" operation is still performed.
+       </p>
+       <p>
+        If the Value element is not present then this Mode MUST simply remove 
+        the referenced fragment. If the fragment is already absent, or if 
+        the Expression evaluates to an empty fragment, then this operation 
+        MUST have no effect. If the implementation is schema aware
+        and it detects that the Expression is not valid per the schema then a
+        wsf:InvalidExpression fault MUST be generated.
+       </p>
+       <p>
+        When this Mode value is used the Value element MUST be present.
        </p>
       </def>
      </gitem>
 
      <gitem>
-      <label> <kw>[Body]</kw>/wst:Put/wsf:Fragment/wsf:Expression@Mode="http://www.w3.org/&wsfra.nsprefix;/ws-fra/Modes/Insert" </label>
+      <label> <kw>[Body]</kw>/wst:Put/wsf:Fragment/wsf:Expression@Mode="http://www.w3.org/&wsfra.nsprefix;/ws-fra/Modes/Add" </label>
       <def>
        <p>
-        When the Mode attribute is set to a value of 
-        "http://www.w3.org/&wsfra.nsprefix;/ws-fra/Modes/Insert" the resource 
-        representation specified within the Value element MUST be added to 
-        the resource representation. If the expression targets a repeated 
-        element (maxOccurs > 1), the fragment MUST be added at the end. If 
-        the expression targets a non-repeated element (maxOccurrs = 1) that 
-        already exists, the resource MUST generate a 
-        wst:InvalidRepresentation fault. If the expression targets an 
-        existing item of a repeated element, the fragment MUST be added 
-        before the existing item. 
+        This Mode value indicates that the children of the Value element 
+        MUST be added to the resource representation relative to the 
+        fragment referenced by the children of the Expression element.
+       </p>
+       <p>
+        If the Value element contains an attribute node then the attribute 
+        MUST be added to the referenced element. If an attribute with 
+        that name already exists then a wst:InvalidRepresentation fault 
+        MUST be generated.
+       </p>
+       <p>
+        If the Value element contains a fragment that is not an 
+        attribute node, the children of the Value element are added as 
+        children to the referenced fragment.
+       </p>
+       <p>
+        When adding a child element and a child element of that QName 
+        already exists, the new element MUST be added to the end of that 
+        sequence of child elements. If the requester wants to ensure 
+        that only a single instance of that child element is present 
+        it can use the "Replace" instead.
+       </p>
+       <p>
+        While schema validation is not required of resource managers, 
+        since resources are only allowed to have a single root element, 
+        attempts to "Add" a second root element MUST generate a 
+        wst:InvalidRepresentation fault.
+       </p>
+       <p>
+        When this Mode value is used the Value element MUST be present.
+       </p>
+      </def>
+     </gitem>
+
+     <gitem>
+      <label> <kw>[Body]</kw>/wst:Put/wsf:Fragment/wsf:Expression@Mode="http://www.w3.org/&wsfra.nsprefix;/ws-fra/Modes/InsertBefore" </label>
+      <def>
+       <p>
+        This Mode value indicates that the children of the Value element 
+        MUST be inserted immediately before (as a sibling to) the fragment 
+        referenced by the children of the Expression element. Note, this 
+        Mode MUST NOT be used for attributes.
+       </p>
+       <p>
+        If the implementation is schema aware and it detects that the 
+        Expression does not reference a sequence then it MUST generate 
+        a wst:InvalidRepresentation fault. 
+       </p>
+       <p>
+        When this Mode value is used the Value element MUST be present.
+       </p>
+      </def>
+     </gitem>
+
+     <gitem>
+      <label> <kw>[Body]</kw>/wst:Put/wsf:Fragment/wsf:Expression@Mode="http://www.w3.org/&wsfra.nsprefix;/ws-fra/Modes/InsertAfter" </label>
+      <def>
+       <p>
+        This Mode value indicates that the children of the Value element 
+        MUST be inserted immediately after (as a sibling to) the fragment 
+        referenced by the children of the Expression element. Note, this 
+        Mode MUST NOT be used for attributes.
+       </p>
+       <p>
+        If the implementation is schema aware and it detects that the 
+        Expression does not reference a sequence then it MUST generate 
+        a wst:InvalidRepresentation fault. 
+       </p>
+       <p>
+        When this Mode value is used the Value element MUST be present.
        </p>
       </def>
      </gitem>
@@ -741,8 +1029,7 @@
         MUST be deleted from the resource representation. 
        </p>
        <p>
-        Note: the Value element MUST NOT be present if this attribute
-        has a value of "http://www.w3.org/&wsfra.nsprefix;/ws-fra/Modes/Remove".
+        When this Mode value is used the Value element MUST NOT be present.
        </p>
       </def>
      </gitem>
@@ -752,25 +1039,18 @@
       <def>
        <p>
         This OPTIONAL element contains the fragment resource representation
-        corresponding to the subset of the resource identified by the 
-        wsf:Expression element.
+        to be added to the resource representation.
         If the contents of this element are invalid, a 
         wst:InvalidRepresentation fault MUST be generated.
        </p>
        <p>
-        When Mode is "http://www.w3.org/&wsfra.nsprefix;/ws-fra/Modes/Insert"
-        or "http://www.w3.org/&wsfra.nsprefix;/ws-fra/Modes/Replace", any
-        optional values (element or attributes) within this subset that are 
+        Any optional values (element or attributes) within this subset that are 
         not specified in the Value element MUST be set to a resource-specific 
         default value.
        </p>
        <p>
-        This element MUST NOT be present if the Mode attribute has a value 
-        of "http://www.w3.org/&wsfra.nsprefix;/ws-fra/Modes/Remove". This element 
-        MUST be present if the Mode attribute has a value of either
-        "http://www.w3.org/&wsfra.nsprefix;/ws-fra/Modes/Replace" or 
-        "http://www.w3.org/&wsfra.nsprefix;/ws-fra/Modes/Insert". When present, 
-        this element MAY be empty.
+        The children of this element MUST be serialized according to the 
+        rules defined in <specref ref="FragSer"/>.
        </p>
       </def>
      </gitem>
@@ -796,6 +1076,216 @@
     <p>
      There are no additional constraints beyond what WS-Transfer defines.
     </p>
+
+    <p>
+     The following table elaborates on the expected behavior of a 
+     WS-Fragment Put request using the XPath Level 1 language.
+    </p>
+
+    <p>
+     Given a resource whose schema is defined as:
+    </p>
+
+    <example>
+     <eg>&lt;a foo="xs:integer"? bar="xs:integer"? >
+  ( &lt;b> &lt;c/> &lt;/b> * | &lt;c/> ) 
+&lt;/a></eg>
+    </example>
+
+    <p>
+     Note: for the sake of clarity, some element names have a ' or " to 
+     indicate that it is a different instance of that type of element.
+    </p>
+
+    <table border="1">
+     <tbody>
+      <tr>
+       <td>Initial Representation</td>
+       <td>@Mode</td>
+       <td>Expression</td>
+       <td>Value</td>
+       <td>Final Represenation</td>
+      </tr>
+
+      <tr>
+       <td></td>
+       <td>Add</td>
+       <td>/</td>
+       <td>&lt;a/></td>
+       <td>&lt;a/></td>
+      </tr>
+
+      <tr>
+       <td></td>
+       <td>Replace</td>
+       <td>/</td>
+       <td>&lt;a/></td>
+       <td>&lt;a/></td>
+      </tr>
+
+      <tr>
+       <td>&lt;a/></td>
+       <td>Add</td>
+       <td>/</td>
+       <td>&lt;a'/></td>
+       <td>fault</td>
+      </tr>
+
+      <tr>
+       <td>&lt;a/></td>
+       <td>Replace</td>
+       <td>/a</td>
+       <td>&lt;a'/></td>
+       <td>&lt;a'/></td>
+      </tr>
+
+      <tr>
+       <td>&lt;a/></td>
+       <td>Add</td>
+       <td>/a</td>
+       <td>&lt;wsf:AttributeNode name="foo">1&lt;/wsf:AttributeNode></td>
+       <td>&lt;a foo="1"/></td>
+      </tr>
+
+      <tr>
+       <td>&lt;a foo="1"/></td>
+       <td>Add</td>
+       <td>/a</td>
+       <td>&lt;wsf:AttributeNode name="foo">2&lt;/wsf:AttributeNode></td>
+       <td>fault</td>
+      </tr>
+
+      <tr>
+       <td>&lt;a foo="1"/></td>
+       <td>Replace</td>
+       <td>/a@foo</td>
+       <td>&lt;wsf:AttributeNode name="foo">2&lt;/wsf:AttributeNode></td>
+       <td>&lt;a foo="2"/></td>
+      </tr>
+
+      <tr>
+       <td>&lt;a foo="1"/></td>
+       <td>Replace</td>
+       <td>/a@foo</td>
+       <td>&lt;wsf:AttributeNode name="bar">2&lt;/wsf:AttributeNode></td>
+       <td>&lt;a bar="2"/></td>
+      </tr>
+
+      <tr>
+       <td>&lt;a/></td>
+       <td>Replace</td>
+       <td>/a@foo</td>
+       <td>&lt;wsf:AttributeNode name="bar">2&lt;/wsf:AttributeNode></td>
+       <td>&lt;a bar="2"/></td>
+      </tr>
+
+      <tr>
+       <td>&lt;a foo="1"/></td>
+       <td>Remove</td>
+       <td>/a@foo</td>
+       <td></td>
+       <td>&lt;a/></td>
+      </tr>
+      
+      <tr>
+       <td>&lt;a/></td>
+       <td>Add</td>
+       <td>/a</td>
+       <td>&lt;b/></td>
+       <td>&lt;a> &lt;b/> &lt;/a></td>
+      </tr>
+
+      <tr>
+       <td>&lt;a> &lt;b/> &lt;/a></td>
+       <td>Add</td>
+       <td>/a</td>
+       <td>&lt;b'/></td>
+       <td>&lt;a> &lt;b/> &lt;b'/> &lt;/a></td>
+      </tr>
+
+      <tr>
+       <td>&lt;a> &lt;b/> &lt;/a></td>
+       <td>Replace</td>
+       <td>/a/b</td>
+       <td>&lt;b'/></td>
+       <td>&lt;a> &lt;b'/> &lt;/a></td>
+      </tr>
+
+      <tr>
+       <td>&lt;a/></td>
+       <td>Replace</td>
+       <td>/a/b</td>
+       <td>&lt;b/></td>
+       <td>&lt;a> &lt;b/> &lt;/a></td>
+      </tr>
+
+      <tr>
+       <td>&lt;a> &lt;b/> &lt;b'> &lt;/a></td>
+       <td>InsertAfter</td>
+       <td>/a/b or /a/b[last()]</td>
+       <td>&lt;b"/></td>
+       <td>&lt;a> &lt;b/> &lt;b'> &lt;b"/> &lt;/a></td>
+      </tr>
+
+      <tr>
+       <td>&lt;a> &lt;b/> &lt;b'> &lt;/a></td>
+       <td>InsertBefore</td>
+       <td>/a/b or /a/b[1]</td>
+       <td>&lt;b"/></td>
+       <td>&lt;a> &lt;b"/> &lt;b> &lt;b'/> &lt;/a></td>
+      </tr>
+
+      <tr>
+       <td>&lt;a> &lt;b/> &lt;b'> &lt;/a></td>
+       <td>Replace</td>
+       <td>/a/b</td>
+       <td>&lt;b"/></td>
+       <td>&lt;a> &lt;b"/> &lt;/a></td>
+      </tr>
+
+      <tr>
+       <td>&lt;a> &lt;b/> &lt;b'> &lt;/a></td>
+       <td>Replace</td>
+       <td>/a/b[1]</td>
+       <td>&lt;b"/></td>
+       <td>&lt;a> &lt;b"/> &lt;b'> &lt;/a></td>
+      </tr>
+
+      <tr>
+       <td>&lt;a> &lt;b/> &lt;/a></td>
+       <td>Remove</td>
+       <td>/a/b</td>
+       <td></td>
+       <td>&lt;a/></td>
+      </tr>
+
+      <tr>
+       <td>&lt;a> &lt;b/> &lt;b'> &lt;/a></td>
+       <td>Remove</td>
+       <td>/a/b</td>
+       <td></td>
+       <td>&lt;a/></td>
+      </tr>
+
+      <tr>
+       <td>&lt;a> &lt;b/> &lt;b'> &lt;/a></td>
+       <td>Remove</td>
+       <td>/a/b[1]</td>
+       <td></td>
+       <td>&lt;a> &lt;b'> &lt;/a></td>
+      </tr>
+
+      <tr>
+       <td>&lt;a> &lt;b/> &lt;b'> &lt;/a></td>
+       <td>Replace</td>
+       <td>/a/b</td>
+       <td>&lt;c/></td>
+       <td>&lt;a> &lt;c> &lt;/a></td>
+      </tr>
+
+     </tbody>
+    </table>
+
    </div2>
 
    <div2 id="Delete">
@@ -1193,37 +1683,12 @@
    </example>
    
    <p>
-    In the case of a Put operation, if the XPath expression selects more
-    than one node, the implementation MUST process only the first selected
-    node.  This allows simple implementations to avoid the overhead of
-    checking the remainder of the resource document for a possible match.
-   </p>
-  
-   <p>
     Conformant implementations MAY supply additional functions
     and capabilities, but MUST adhere to the minimum behavior described above.
    </p>
      
    <p>
     The XPath Level 1 language does not support computed values. 
-    Text and attribute nodes MUST be serialized in the GetResponse
-    message using the same serialization as for the XPath 1.0 language.
-    This serialization mechanism MUST NOT be used in the PutRequest message.
-   </p>
-
-   <p>
-    The namespace bindings are evaluated against any namespace
-    declarations that are in scope where the expression appears within the SOAP
-    message.
-    Note that the evaluation of expressions that rely on such context
-    dependent bindings is fragile in the face of transformations that alter
-    namespace prefixes. Such transformations might occur during the
-    transmission, processing, storage, or retrieval of a request. Clients
-    that wish to isolate expressions from the effects of any changes to the
-    namespace prefixes in the containing SOAP message are advised to
-    construct expressions in a manner that avoids the use of namespace
-    prefixes. For example, use an expression such as
-    "/a[namespace-uri()='http://www.example.com']" not "/ns1:a".
    </p>
   </div1>
 
@@ -1283,158 +1748,10 @@
    </p>
 
    <p>
-    In the case of a Put operation if the XPath expression selects more 
-    than one node, the implementation MUST process only the first selected 
-    node. This allows simple implementations to avoid the overhead of 
-    checking the remainder of the resource document for a possible match. 
-   </p>
-
-   <p>
-    The remainder of this section defines an XML serialization mechanism 
-    that MUST be used when constructing a GetResponse message. Since the 
-    PutRequest message MUST NOT be used to modify more than one target, 
-    these serialization rules MUST NOT be used in a PutRequest message.
-   </p>
-    
-   <p>
-    Expressions MUST evaluate to one of four
-    possible types: a node-set, a Boolean, a number or a string. The 
-    latter three types are the results of evaluating a computed expression. 
-    When they appear in a GetResponse message they are serialized
-    by performing the following conversion and then wrapping the result in 
-    the wsf:Value element:
-   </p>
-   <ulist>
-    <item> <p>Boolean - converted to an xs:boolean</p> </item>
-    <item> <p>string - convert to an xs:string</p> </item>
-    <item> <p>number - convert to an xs:double</p> </item>
-   </ulist>
-   
-   <p>
-    A node-set is zero or more elements, attributes or text
-    values of elements. A node-set is serialized into XML by 
-    concatenating each
-    node and enclosing it in the wsf:Value wrapper XML element for which 
-    schema
-    validation is suppressed. Element nodes in a node-set are serialized 
-    directly
-    into their XML representation. For attributes and text nodes in the 
-    node-set,
-    a wrapper element is used to enclose these values to distinguish them from
-    other such nodes in the serialized result.
-   </p>
-   
-   <p>
-    Attribute nodes in XPath are represented in the following form:
-   </p>
-   
-   <example>
-    <eg>name="value"</eg>
-   </example>
-    
-   <p>
-    Serialization of an attribute node separates the name from
-    the value using the following element:
-   </p>
-
-   <example>
-    <eg>(01) &lt;wsf:AttributeNode name="<emph>xs:QName</emph>">
-(02)   <emph>attribute value</emph>
-(03) &lt;/wsf:AttributeNode&gt;</eg>
-   </example>
-    
-   <p>
-    The following describes additional constraints on the outline 
-    listed above:
-   </p>
-   
-   <glist>
-    <gitem>
-     <label> wsf:AttributeNode </label>
-     <def>
-      <p>
-       This element is used to serialize an attribute node in a
-       node-set and MUST contain the value portion of the attribute node.
-      </p>
-     </def>
-    </gitem>
-
-    <gitem>
-     <label> wsf:AttributeNode/@name </label>
-     <def>
-      <p>
-       This attribute MUST be the qualified name of the attribute node.
-      </p>
-     </def>
-    </gitem>
-   </glist>
-   
-   <p>
-    Text nodes are serialized in the following form:
-   </p>
-
-   <example>
-    <eg>(01) &lt;wsf:TextNode&gt;
-(02)   <emph>text value</emph>
-(03) &lt;/wsf:TextNode&gt;</eg>
-   </example>
-    
-   <p>
-    The following describes additional constraints on the
-    outline listed above:
-   </p>
-    
-   <glist>
-    <gitem>
-     <label> wsf:TextNode </label>
-     <def>
-      <p>
-       This element is used to serialize a text node in a node-set
-       and MUST contain the text value.
-      </p>
-     </def>
-    </gitem>
-   </glist>
-    
-   <p>Given the following XML as an example document.</p>
-    
-   <example>
-    <eg>(01) &lt;a xmlns="example"&gt;
-(02)   &lt;b&gt;1&lt;/b&gt;
-(03)   &lt;c x="y"&gt;2&lt;/c&gt;
-(04) &lt;/a&gt;</eg>
-   </example>
-    
-   <p>
-    The result of the XPath "/a/b | /a/b/text() | /a/c/@x" would
-    be serialized as the following:
+    The serialization and context rules defined by the XPath Level 1 
+    language apply to the XPath 1.0 language as well.
    </p>
-   
-   <example>
-    <eg>(01) &lt;wsf:Value&gt;
-(02)   &lt;b&gt;1&lt;/b&gt;
-(03)   &lt;wsf:TextNode&gt;1&lt;/wsf:TextNode&gt;
-(04)   &lt;wsf:AttributeNode name="x"&gt;y&lt;/wsf:AttributeNode&gt;
-(05) &lt;/wsf:Value&gt;</eg>
-   </example>
-    
-   <p>The nodes in the node-set MAY be serialized in any order.</p>
 
-   <p>
-    The namespace bindings are evaluated against any namespace
-    declarations that are in scope where the expression appears within the SOAP
-    message.
-    Note that the evaluation of expressions that rely on such context
-    dependent bindings is fragile in the face of transformations that alter
-    namespace prefixes. Such transformations might occur during the
-    transmission, processing, storage, or retrieval of a request. Clients
-    that wish to isolate expressions from the effects of any changes to the
-    namespace prefixes in the containing SOAP message are advised to
-    construct expressions in a manner that avoids the use of namespace
-    prefixes. For example, use an expression such as
-    "/a[namespace-uri()='http://www.example.com']" not "/ns1:a".
-   </p>
-    
   </div1>
 
   <div1 id="Faults">
@@ -2180,6 +2497,14 @@
        <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=9032">9032</loc>
       </td>
      </tr>
+     <tr>
+      <td> 2010/03/02 </td>
+      <td> DD </td>
+      <td> Added resolution of issue 
+       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=8185">8185</loc>,
+       <loc href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=8193">8193</loc>
+      </td>
+     </tr>
     </tbody>
    </table>
   </div1>

Received on Wednesday, 3 March 2010 02:25:20 UTC