Subject: RE: [Simple] A proposal for fixing the xcap schema problem and relatedissues

From: "Thomson, Martin" <[email-masked]>
Date: Tue, 11 Oct 2005 17:22:41 -0500

Jari,

Apologies, I don't want to slow this down, but your comments on text() triggered a few thoughts.

Do you think that it would be helpful to state reasons for not including this functionality (body of requests would be text/plain rather than application/xml, which would have to be quoted upon insertion), and the limitations of not being able to use text() (requiring the enclosing element for all text changes).  

Further, is the following type of use case valid?

<presence>
   <note xml:id="some-id">Some text</note>
</presence>

PUT .../~~/presence/note/text()[1]
Content-Type: text/plain

This text replaces the original.  This contains XML comments that
need to be quoted <!-- ouch -->.

Might be worth noting that if the text() function isn't provided and a user only wants to update the text.  If they don't know all the associated attributes on the element, they need to fetch the element before updating its contents.

Cheers,
Martin

-----Original Message-----
From: [email-masked] [mailto:[email-masked]] On Behalf Of Jari Urpalainen
Sent: Tuesday, 11 October 2005 9:18 PM
To: ext Jonathan Rosenberg
Cc: Simple WG
Subject: Re: [Simple] A proposal for fixing the xcap schema problem and relatedissues

It is unfortunate that we have to fix these bugs, but it is still imo 
better than to start xcap-bis. Some comments inline.

...<snip>...
  
  <tuple id="p2"/><tuple id="p3"/>
  <!-- comment -->
  <person/>
</presence>
so the two whitespace text nodes have been catenated together. Then 
again we could delete the first text node child of <presence> with 
delete .../presence/text()[1] ending up with:
<presence><tuple id="p2"/><tuple id="p3"/>
  <!-- comment -->
  <person/>
</presence>
or we could have replaced the first text node with put 
../presence/text()[1]  (pl: linefeed with two spaces):
<presence>
  <tuple id="p2"/><tuple id="p3"/>
  <!-- comment -->
  <person/>
</presence>
This would mean adding text() function to the BNF. However, I cannot 
imagine any reasonable way to add a whitespace text node between those 
two tuples. So I am NOT proposing to add text() function to the BNF,  
just trying to clarify the issue. And what's the issue actually ?  The 
canonical format of the document must be predictable, this means that 
some whitespace text nodes are meaningful (xml:space="preserve" is the 
default btw.). So I am just proposing that xcap spec just describes this 
issue, too.

<snip>

------------------------------------------------------------------------------------------------
This message is for the designated recipient only and may
contain privileged, proprietary, or otherwise private information.  
If you have received it in error, please notify the sender
immediately and delete the original.  Any unauthorized use of
this email is prohibited.
------------------------------------------------------------------------------------------------
[mf2]

_______________________________________________
Simple mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/simple

---

From: Jari Urpalainen <[email-masked]>
Date: Wed, 12 Oct 2005 09:34:06 +0300

>Might be worth noting that if the text() function isn't provided and a user only wants to update the text.  If they don't know all the associated attributes on the element, they need to fetch the el…
We have had some disputes in the past what is the level of flexibility 
of the xcap bnf. There are quite many cases which could also be used in 
xcap (and e.g. xml-patch-ops has text() for this particular reason): 
element value comparisons, comments etc.  However, of course it adds 
also some minor complexity to the protocol and these kind of things can 
easily be added later as an xcap extension if so desired. I do not 
definitely want to open Pandora's box here, just to fix clear bugs and 
have the rfc ready.
br,
Jari