1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-09-18 14:34:32 +03:00
Files
libxslt/tests/docs/bug-214.xml
Nick Wellnhofer a846514a15 Don't cache direct evaluation of patterns with variables
The slow pattern matching path in xsltTestCompMatchDirect caches the
result of evaluating the pattern. But this can't be done if the pattern
contains variables which could evaluate to different values.

Only enable the cache for patterns like template matches that don't
allow variable references. Don't use the cache for "count" and "from"
patterns in xsl:number.

A more fine-grained approach would be nice, but most effort should be
spent on eliminating the slow path completely.

Thanks to Martin Honnen for the report.

Fixes #6.
2018-11-21 17:37:19 +01:00

7 lines
88 B
XML

<root>
<element type="a"/>
<element type="b"/>
<element type="a"/>
</root>