Re: Viewport and nested selected nodes

> So, in XSLT, a select attribute with a value of "//h:div" would return
> all the "h:div" elements in the document.  In our case, we're going
> to return only the outermost elements.  As such, it isn't the same thing
> as a select pattern in XSLT.  Given that, it seems like we're going
> to confuse users who come from XSLT-land.

That is a very good point.

The main disadvantage of match patterns is that some things aren't
readily expressible with them.  For example, "the first foo element
in the document".  As a select expression, that's

   (//foo)[1]

As a match pattern, the obvious equivalent is

   foo[not(preceding::foo)]

which is likely to be very expensive.

-- Richard

Received on Tuesday, 24 October 2006 23:41:27 UTC