xsl-list
[Top] [All Lists]

Re: [xsl] Cost of complex match patterns

2008-08-12 02:56:41
Andrew Welch wrote:

  Hi Andrew,

match="foo[//bar]"

match="foo"

Should the former be avoided, or because it's within a match
pattern it's converted to a simple lookup so it's fine?

  I don't know the details of your processor on that point, but out of
interest, if you only match on the main input tree, you can replace the
former by:

    <xsl:variable name="has-bar" as="xs:boolean" select="
        exists(//bar)"/>

    <xsl:template match="foo[$has-bar]">

  Regards,

--drkm
























      
_____________________________________________________________________________ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr

--~------------------------------------------------------------------
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>
--~--