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

Re: Viewport and nested selected nodes

From: Norman Walsh <Norman.Walsh@Sun.COM>
Date: Mon, 23 Oct 2006 13:22:28 -0400
To: public-xml-processing-model-wg@w3.org
Message-ID: <87iribx7zf.fsf@nwalsh.com>
/ Jeni Tennison <jeni@jenitennison.com> was heard to say:
| what happens when one selected <div> is a descendant of another
| selected <div>?
|
| I think that viewport should probably filter the selected nodes to
| only those that do not have another selected node as a descendant.

I had the opposite strategy in mind, where the filter selects the
"outermost" matching nodes and ignores nested matches.

So, given:

<body>
  <div class="o1">
    <div class="i1">
      <p/>
    </div>
  </div>
  <div class="o2">
    <p/>
  </div>
</body>

a viewport that processes "//div" will replace this subtree
with the results of processing it:

  <div class="o1">
    <div class="i1">
      <p/>
    </div>
  </div>

and this subtree with the results of processing it:

  <div class="o2">
    <p/>
  </div>

The "i1" div never gets called out as a match.

I could also live with calling this situation an error, but I'm
hesitate to suggested that we should look into the descendants before
filtering. I'd like to be able to analyze the expression and, for many
cases including //div, use a streaming implementation.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh
XML Standards Architect
Sun Microsystems, Inc.

Received on Monday, 23 October 2006 17:22:48 GMT

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