W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > April 2007

Renaming 'target' and handling "inner" matches

From: Alex Milowski <alex@milowski.org>
Date: Sun, 29 Apr 2007 14:33:30 -0700
Message-ID: <28d56ece0704291433y5c9a9559r860c2684453e1343@mail.gmail.com>
To: "XMLProc List" <public-xml-processing-model-wg@w3.org>
We've all stated that we want to rename the 'target' option for XPaths.
Here are
the steps that have this option:

   p:delete
   p:insert
   p:rename
   p:replace
   p:unwrap
   p:wrap

We've gotten to the point where some have agreed that we should call
this option 'match' and use match patterns.

On the call, I think Henry noted that it doesn't matter whether we call
it 'match' or 'select' because we still need to define what the step does
with "inner" matches.   That is, "div" or "//div" still can match a div
inside
a div and so our steps must define what they do in those situations.

Some steps consume their targets and so the case of inner matches goes
away:

   p:delete
   p:replace

The rest have definable semantics for handling inner matches:

  * p:insert - it is well defined where the insertion happens for each
    match regardless of whether one is contained in another.  The canonical
    example here is inserting a paragraph into every 'div' in an XHTML
document.

  * p:rename - Renaming an element doesn't affect its child.

  * p:unwrap - Removing an element wrapper doesn't affect its children.

  * p:wrap - Added an element wrapper doesn't affect its children.


-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics
Received on Sunday, 29 April 2007 21:33:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:50 GMT