xsl-list
[Top] [All Lists]

Re: Performance

2005-10-12 07:41:33
How about this?

....
<xsl:variable name="inc"><xsl:apply-templates select="*" /></xsl:variable>
<br/>count is: <xsl:value-of select="string-length(normalize-space($inc))" />
</xsl:template>

<xsl:template match="*[not(starts-with(name(), 'DGBUIMSNNumber'))]" priority="+1" />
<xsl:template match="*[(_at_)action='default']">d</xsl:template>
<xsl:template match="*[(_at_)action='add']">a</xsl:template>
<xsl:template match="*" />


Khorasani, Houman wrote:

I just have noticed
This way of writing the code is much faster

count(*[starts-with(name(),'DGBUIMSNNumber')][(_at_)action='add'])

than this way:

count(*[starts-with(name(),'DGBUIMSNNumber') and @action='add'])


Why is that?


And how do I write this piece of code like the above in the 'faster'
way?

count(*[starts-with(name(),'DGBUIMSNNumber') and (@action='default' or
@action='add')])


Because this would imply I had two 'and' instead of one 'and' and one
'or' correct?

count(*[starts-with(name(),'DGBUIMSNNumber')][(_at_)action='default'][(_at_)action
='add'])


Regards
Houman

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





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