xsl-list
[Top] [All Lists]

Re: [xsl] XSLT 1.0 support in browsers, as of June 2008

2008-06-18 08:21:01
Julian Reschke schrieb:
  <xsl:template match="text()[not(ancestor::artwork)]">

What's the problem with this particular expression?

For every text node this template applies to, a check must be performed
to determine if there is any artwork element node on the ancestor axis.
This is probably not terribly bad, but it doesn't look efficient either.
I haven't examined your program, but there might be a way to code this
more efficiently, maybe by using an artwork mode or an artwork parameter,
so the information is available at each step and does not have to be
looked up 3464 times, as in rfc2616.xml.

There probably isn't any problem with this one expression. Your heavy
use of the descendant axis is likely to involve much more scanning,
especially when started at the root. The processor has to search the
entire document, and if the document has a lot of nodes, this may take a
long time, even growing exponentially.

    grep -E '([^:]//|descendant)' rfc2629.xslt

Michael Ludwig

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>