W3C home > Mailing lists > Public > public-change@w3.org > March 2013

RE: [OFF-LIST] RE: XPath to identify a point in an XML document (Was: A sort of synthesis)

From: Dennis E. Hamilton <dennis.hamilton@acm.org>
Date: Fri, 15 Mar 2013 10:40:48 -0700
To: <public-change@w3.org>
Cc: "'Claudius Teodorescu'" <claudius.teodorescu@gmail.com>
Message-ID: <013801ce21a4$3bc01400$b3403c00$@acm.org>
Claudius asked me an interesting question in an off-list note today.
With his permission I am reporting his question and my response to
the list.

Also, since this happened, a big coin dropped on my head.  I think I
have a way to express a model that has eluded me for at least four
years.  I will report on that separately.


   I am thinking of an EXPath String Module, containing useful 
   functions for string manipulation, of which I guess the 
   following could help:

     - string:remove-substring($index, $length);

     - string:insert-substring($index, $substring).

   What do you think?

MY INITIAL THINKING (very off the top of my head)

I am not clear that it is a good thing to have manipulation of 
the DOM directly in EXPath.  

I have not looked more closely into your ExPath work, 
I should do so.

My first thought was there needed to be a way to use [E]XPath 
extension to set a cursor into a text node or an attribute node.  
(I suppose comment nodes qualify also, as long as we're generalizing.) 
I don't know how that should work, since it is not part of the 
InfoSet model.  

The reason for setting cursors for start and end points is the need to 
specify exactly where a tear is made for deletion or replacement in 
applying a change.  Some of these are not so helpful if they need 
to be broken down into small atomic operations.

An after-thought.  It might be that, if one wanted to stay "pure," 
it is desirable to have an ExPath and an ExSLT.  Even though 
implementations might have specialized cases and other ways of 
coding the data, being able to do that would be an interesting 
confirmation of the concept [and a model] as well as a way to do 
it for custom manipulation of XML documents.
Received on Friday, 15 March 2013 17:41:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:11:22 UTC