Project

Profile

Help

Bug #5633

closed

Cannot copy a variable reference whose binding is unknown [Saxon 11]

Added by Radu Coravu over 1 year ago. Updated over 1 year ago.

Status:
Duplicate
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2022-08-04
Due date:
% Done:

0%

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

Description

Attaching a zip with XSLTs. If I try to create a transformer over the stylesheet "EXM-38993\dita2fo_import.xsl" I get an exception thrown:

java.lang.UnsupportedOperationException: Cannot copy a variable reference whose binding is unknown
	at net.sf.saxon.expr.GlobalVariableReference.copy(GlobalVariableReference.java:43)
	at net.sf.saxon.expr.FilterExpression.copy(FilterExpression.java:1188)
	at net.sf.saxon.expr.SlashExpression.copy(SlashExpression.java:637)
	at net.sf.saxon.pattern.GeneralNodePattern.makeTopNodeEquivalent(GeneralNodePattern.java:61)
	at net.sf.saxon.pattern.GeneralNodePattern.<init>(GeneralNodePattern.java:47)
	at net.sf.saxon.expr.SlashExpression.toPattern(SlashExpression.java:849)
	at net.sf.saxon.expr.sort.DocumentSorter.toPattern(DocumentSorter.java:252)
	at net.sf.saxon.pattern.PatternMaker.fromExpression(PatternMaker.java:45)
	at net.sf.saxon.pattern.PatternParser.parsePattern(PatternParser.java:160)
	at net.sf.saxon.pattern.Pattern.make(Pattern.java:58)
	at net.sf.saxon.style.StyleElement.makePattern(StyleElement.java:739)
	at net.sf.saxon.style.XSLTemplate.prepareAttributes(XSLTemplate.java:371)
	at net.sf.saxon.style.StyleElement.processAttributes(StyleElement.java:610)
	at net.sf.saxon.style.StyleElement.processAllAttributes(StyleElement.java:547)
	at net.sf.saxon.style.XSLTemplate.processAllAttributes(XSLTemplate.java:428)
	at net.sf.saxon.style.PrincipalStylesheetModule.processAllAttributes(PrincipalStylesheetModule.java:587)
	at net.sf.saxon.style.PrincipalStylesheetModule.preprocess(PrincipalStylesheetModule.java:367)
	at net.sf.saxon.style.Compilation.compilePackage(Compilation.java:290)
	at net.sf.saxon.style.StylesheetModule.loadStylesheet(StylesheetModule.java:249)
	at net.sf.saxon.style.Compilation.compileSingletonPackage(Compilation.java:113)
	at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:932)
	at net.sf.saxon.jaxp.SaxonTransformerFactory.newTemplates(SaxonTransformerFactory.java:174)
	at net.sf.saxon.jaxp.SaxonTransformerFactory.newTransformer(SaxonTransformerFactory.java:131)

Before, with Saxon 10 I got an error like "The parent axis starting at a document node will never select anything" with the same stylesheet.


Files

EXM-38993.zip (194 KB) EXM-38993.zip Radu Coravu, 2022-08-04 08:41

Related issues

Is duplicate of Saxon - Bug #5495: java.lang.UnsupportedOperationException: Cannot copy a variable reference whose binding is unknownClosed2022-05-18

Actions
Actions #1

Updated by Radu Coravu over 1 year ago

The transformer uses an Enterprise Configuration. The error I previously got with Saxon 10 also had line/number information:

System ID: D:\projects\..\EXM-38993\dita2fo_indexsort.xsl
Main validation file: D:\projects..\EXM-38993\dita2fo_import.xsl
Scenario name: XSLT
Document type: XSLT
Engine name: Saxon-EE 10.6
Severity: warning
Problem ID: SXWN9000
Description: The parent axis starting at a document node will never select anything
Start location: 162:48
URL: http://www.saxonica.com/html/documentation/javadoc/net/sf/saxon/trans/SaxonErrorCode.html#SXWN9000

Actions #2

Updated by Michael Kay over 1 year ago

I'm currently seeing

SaxonJ-EE 11.4 from Saxonica
Java version 11.0.6
Using license serial number K009885
Warning at char 3 in xsl:param/@select on line 162 column 48 of dita2fo_indexsort.xsl:
  SXWN9000  The parent axis starting at a document node will never select anything
Stylesheet compilation time: 2.317676595s (2317.676595ms)
Actions #3

Updated by Michael Kay over 1 year ago

The warning relates to the expression /... IIRC Saxon suppresses this warning for a stylesheet with version="1.0", because that was a common way in 1.0 of denoting an empty sequence. In a 2.0 stylesheet, it's better to use ().

Actions #4

Updated by Michael Kay over 1 year ago

Now reproduced using EE 11.3 as issued; the problem appears to have been fixed in 11.4.

Actions #5

Updated by Michael Kay over 1 year ago

  • Status changed from New to Duplicate

Duplicate of bug #5495

Actions #6

Updated by Michael Kay over 1 year ago

  • Is duplicate of Bug #5495: java.lang.UnsupportedOperationException: Cannot copy a variable reference whose binding is unknown added
Actions #7

Updated by Radu Coravu over 1 year ago

Thanks Michael, I confirm the problem is fixed with the latest Saxon 11.4.

Please register to edit this issue

Also available in: Atom PDF