Project

Profile

Help

Bug #1949

ClassCastException running in-scope-prefixes

Added by Michael Kay about 3 years ago.

Status:
New
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
2013-12-06
Due date:
% Done:

0%

Found in version:
1.1
Fixed in version:

Description

Reported on saxon-help list by Gunther Rademacher:

When I tried to use fn:in-scope-prefixes on Saxon CE, I received this
on the Firefox web console:

"SaxonCE.XSLT20Processor CECE12D29....html:876
SEVERE: Exception java.lang.ClassCastException in invokeTransform: null"

Maybe I am missing something, but I can't see a reason why this function
should not be available. A complete reproduction is shown below.

Thanks
Gunther

<html>
<body>
<script type="text/javascript">
var onSaxonLoad = function () {
Saxon.newXSLT20Processor(Saxon.parseXML(
'<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:p="P"
version="2.0">\n' +
' <xsl:template match="node()|@*">\n' +
' <xsl:variable name="v">\n' +
' <p:q>p:q</p:q>\n' +
' </xsl:variable>\n' +
' <h1>\n' +
' <xsl:value-of select=""in-scope-prefixes(",
node-name($v/*), ") = ", in-scope-prefixes($v/*)"/>\n' +
' </h1>\n' +
' </xsl:template>\n' +
'</xsl:stylesheet>'
)).updateHTMLDocument(Saxon.parseXML('<x/>'), null);
};
</script>
<script type="text/javascript" language="javascript"
src="Saxonce/Saxonce.nocache.js"></script>
</body>
</html>

Also available in: Atom PDF