Project

Profile

Help

Bug #1517

closed

java.lang.NullPointerException for "cast as" in AVT

Added by Thomas Weber over 12 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
-
Start date:
2012-05-05
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

I experience the following problem with the attached stylesheet that uses "cast as" in an attribute value template:

$ java -jar saxon9he.jar -xsl:castAsInAVT.xsl -s:castAsInAVT.xsl

java.lang.NullPointerException

at net.sf.saxon.expr.Expression.getExecutable(Expression.java:740)

at net.sf.saxon.expr.ExpressionParser.parseCastExpression(ExpressionParser.java:875)

at net.sf.saxon.expr.ExpressionParser.parseCastableExpression(ExpressionParser.java:804)

at net.sf.saxon.expr.ExpressionParser.parseTreatExpression(ExpressionParser.java:785)

at net.sf.saxon.expr.ExpressionParser.parseInstanceOfExpression(ExpressionParser.java:767)

at net.sf.saxon.expr.ExpressionParser.parseIntersectExpression(ExpressionParser.java:1263)

at net.sf.saxon.expr.ExpressionParser.parseUnionExpression(ExpressionParser.java:1245)

at net.sf.saxon.expr.ExpressionParser.parseMultiplicativeExpression(ExpressionParser.java:1181)

at net.sf.saxon.expr.ExpressionParser.parseAdditiveExpression(ExpressionParser.java:1161)

at net.sf.saxon.expr.ExpressionParser.parseRangeExpression(ExpressionParser.java:1046)

at net.sf.saxon.expr.ExpressionParser.parseComparisonExpression(ExpressionParser.java:995)

at net.sf.saxon.expr.ExpressionParser.parseAndExpression(ExpressionParser.java:568)

at net.sf.saxon.expr.ExpressionParser.parseOrExpression(ExpressionParser.java:550)

at net.sf.saxon.expr.ExpressionParser.parseExprSingle(ExpressionParser.java:474)

at net.sf.saxon.expr.ExpressionParser.parseExpression(ExpressionParser.java:418)

at net.sf.saxon.expr.ExpressionParser.parse(ExpressionParser.java:365)

at net.sf.saxon.style.AttributeValueTemplate.make(AttributeValueTemplate.java:70)

at net.sf.saxon.style.StyleElement.makeAttributeValueTemplate(StyleElement.java:560)

at net.sf.saxon.style.LiteralResultElement.prepareAttributes(LiteralResultElement.java:115)

at net.sf.saxon.style.StyleElement.processAttributes(StyleElement.java:419)

at net.sf.saxon.style.StyleElement.processAllAttributes(StyleElement.java:368)

at net.sf.saxon.style.StyleElement.processAllAttributes(StyleElement.java:376)

at net.sf.saxon.style.PrincipalStylesheetModule.processAllAttributes(PrincipalStylesheetModule.java:303)

at net.sf.saxon.style.PrincipalStylesheetModule.preprocess(PrincipalStylesheetModule.java:221)

at net.sf.saxon.PreparedStylesheet.setStylesheetDocument(PreparedStylesheet.java:340)

at net.sf.saxon.PreparedStylesheet.prepare(PreparedStylesheet.java:186)

at net.sf.saxon.PreparedStylesheet.compile(PreparedStylesheet.java:104)

at net.sf.saxon.Transform.doTransform(Transform.java:537)

at net.sf.saxon.Transform.main(Transform.java:72)

Fatal error during transformation: java.lang.NullPointerException: (no message)

I have the same problem with Saxon-PE and Saxon-EE from inside oXygen. I updated version 9.3.0.5 that came bundled with oXygen to versions 9.3.0.11 and 9.4.0.3 by replacing saxon9ee.jar in oXygen's lib directory, but the problem remains.

This looks a lot like Bug #651, but as that issue is seven years old and closed, I'm opening a new one.


Files

castAsInAVT.xsl (278 Bytes) castAsInAVT.xsl Thomas Weber, 2012-05-05 07:35

Please register to edit this issue

Also available in: Atom PDF