#616 Incorrect Saxon-SA filter optimization

Michael Kay

Saxon-SA, whenever it can, optimizes a filtered
absolute path expression of the form /a/b/c[use=$value]
to use a document-level index, similar to the indexes
used by xsl:key. Because this mechanism reuses the
implementation of xsl:key, it only works where the path
expression /a/b/c would be valid as an XSLT match
pattern. However, there is a check missing: if the last
step in the path expression uses an axis other than the
child, attribute, or descendant axis, then Saxon fails
to notice that this is not a valid pattern, and as a
result, an incorrect rewrite is performed leading the
expression returning incorrect results at run-time.

(Note to self: source code fixed in OptimizerSA.java,
convertToPattern method)


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks