Project

Profile

Help

Bug #2863

closed

Internal error: expression ("gml:id",...) has no retained static context

Added by George Sofianos over 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Diagnostics
Sprint/Milestone:
Start date:
2016-07-29
Due date:
% Done:

100%

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

Description

We are having this issue while compiling an XSL file. gml:id is an attribute in the XSL file. Here is the stacktrace:

java.lang.NullPointerException: Internal error: expression ("gml:id",...) has no retained static context
	at net.sf.saxon.expr.Expression.getConfiguration(Expression.java:1097)
	at net.sf.saxon.expr.Literal.getItemType(Literal.java:126)
	at net.sf.saxon.style.SourceBinding.getInferredType(SourceBinding.java:520)
	at net.sf.saxon.style.XSLWithParam.compileWithParam(XSLWithParam.java:74)
	at net.sf.saxon.style.StyleElement.getWithParamInstructions(StyleElement.java:2345)
	at net.sf.saxon.style.XSLCallTemplate.compile(XSLCallTemplate.java:211)
	at net.sf.saxon.style.StyleElement.compileSequenceConstructor(StyleElement.java:2097)
	at net.sf.saxon.style.StyleElement.compileSequenceConstructor(StyleElement.java:1998)
	at net.sf.saxon.style.LiteralResultElement.compile(LiteralResultElement.java:310)
	at net.sf.saxon.style.StyleElement.compileSequenceConstructor(StyleElement.java:2097)
	at net.sf.saxon.style.StyleElement.compileSequenceConstructor(StyleElement.java:1998)
	at net.sf.saxon.style.LiteralResultElement.compile(LiteralResultElement.java:310)
	at net.sf.saxon.style.StyleElement.compileSequenceConstructor(StyleElement.java:2097)
	at net.sf.saxon.style.StyleElement.compileSequenceConstructor(StyleElement.java:1998)
	at net.sf.saxon.style.XSLTemplate.compileDeclaration(XSLTemplate.java:534)
	at net.sf.saxon.style.PrincipalStylesheetModule.compile(PrincipalStylesheetModule.java:1166)
	at net.sf.saxon.style.Compilation.compilePackage(Compilation.java:262)
	at net.sf.saxon.style.StylesheetModule.loadStylesheet(StylesheetModule.java:260)
	at net.sf.saxon.style.Compilation.compileSingletonPackage(Compilation.java:101)
	at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:859)

I don't know if it is the same issue as https://saxonica.plan.io/issues/2851 so I had to create a new issue. Sorry if they are the same. Is there any release date for the next version? I've tested the same file with 9.6.0.9 and it works, but I would prefer not to use an older version.

Actions #2

Updated by Michael Kay over 7 years ago

Reproduced with a simplified version of the stylesheet in /Users/mike/Desktop/temp/test1.xsl.

The problem appears to be with the use of xsl:with-param having a select attribute that refers to a global variable whose value is a constant atomic sequence.

Actions #3

Updated by Michael Kay over 7 years ago

  • Status changed from New to Resolved

The problem is in the code in VariableReference.typecheck() that replaces a VariableReference by a literal if the value of the variable is constant. This is not setting the static context information on the new literal. Normally this does no harm, because the information gets added later, but on this particular path we need the context information before it has been aded to the tree.

A patch is being committed in VariableReference.typeCheck() on the 9.7 and 9.8 branches.

Actions #4

Updated by O'Neil Delpratt over 7 years ago

  • % Done changed from 0 to 100
  • Applies to branch 9.7, 9.8 added
  • Fix Committed on Branch 9.7, 9.8 added
Actions #5

Updated by O'Neil Delpratt over 7 years ago

Bug fix applied in the Saxon 9.7.0.8 maintenance release.

Actions #6

Updated by O'Neil Delpratt over 7 years ago

  • Status changed from Resolved to Closed
  • Fixed in Maintenance Release 9.7.0.8 added
Actions #7

Updated by O'Neil Delpratt almost 7 years ago

  • Applies to branch trunk added
  • Applies to branch deleted (9.8)
Actions #8

Updated by O'Neil Delpratt almost 7 years ago

  • Fix Committed on Branch trunk added
  • Fix Committed on Branch deleted (9.8)

Please register to edit this issue

Also available in: Atom PDF