#534 use-when not recognized on unknown XSLT element

v8.7.1
closed
Michael Kay
5
2012-10-08
2006-06-09
Michael Kay
No

If an element in a stylesheet

(a) is in the XSLT namespace

(b) has an unrecognized local name, and

(c) has a use-when attribute

then the use-when attribute is not evaluated: it is
effectively ignored.

Source fix, net.sf.saxon.style.UseWhenFilter.java. line
67, change the code to read:

if (depthOfHole == 0) {
String useWhen;
int uriCode =
getNamePool().getURICode(nameCode);
if (uriCode == NamespaceConstant.XSLT_CODE) {
useWhen =
startTag.getAttribute(useWhenCode);
} else {
useWhen =
startTag.getAttribute(xslUseWhenCode);
}

Discussion