xsl-list
[Top] [All Lists]

Re: [xsl] Performance of predicate-based patterns

2015-01-23 10:33:53
Matches of the form

<xsl:template match="*[name() = ('P','NP','PARA')]">

showed up a fair bit

Yes, we also use this pattern in stylesheets that are parameterized using 
separate XML files. From the XML e.g. a sequence of names is collected in 
variables and matches are similar to

match="*[local-name() = $blockLevelElementNames]"
match="*[local-name() = $inlineLevelElementNames]"
match="@*[local-name() = $commonAttributeNames]"

or sometimes refactored in a function

match="*[ns:SatisfiesCondition(.)]"

Any optimization will be very welcome!

Thanks,

- Michael



--
Michael Müller-Hillebrand
mmh(_at_)docufy(_dot_)de

--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

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