Project

Profile

Help

Bug #3515

closed

[Saxon 9.8] Internal error when executing a .sef file compiled with -relocate:on

Added by Axel Court about 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Low
Category:
-
Sprint/Milestone:
Start date:
2017-11-07
Due date:
% Done:

100%

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

Description

Hi,

We are getting an internal error when trying to run a stylesheet .sef stylesheet compiled with Saxon 9.8.0.6 and the -relocate:on option. See the stacktrace below:

java.lang.RuntimeException: Internal error evaluating template rule 
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:360)
	at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:502)
	at net.sf.saxon.Controller.transformDocument(Controller.java:2402)
	at net.sf.saxon.Controller.transform(Controller.java:1970)
	at net.sf.saxon.s9api.Xslt30Transformer.applyTemplates(Xslt30Transformer.java:593)
	at net.sf.saxon.Transform.processFile(Transform.java:1257)
	at net.sf.saxon.Transform.doTransform(Transform.java:780)
	at net.sf.saxon.Transform.main(Transform.java:81)
Caused by: java.lang.NullPointerException
	at java.util.Hashtable.put(Unknown Source)
	at java.util.Properties.setProperty(Unknown Source)
	at net.sf.saxon.expr.instruct.ResultDocument.processInstruction(ResultDocument.java:413)
	at net.sf.saxon.Configuration.processResultDocument(Configuration.java:2237)
	at com.saxonica.config.EnterpriseConfiguration.processResultDocument(EnterpriseConfiguration.java:1895)
	at net.sf.saxon.expr.instruct.ResultDocument.process(ResultDocument.java:387)
	at net.sf.saxon.expr.instruct.ResultDocument.processLeavingTail(ResultDocument.java:373)
	at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:880)
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:347)
	... 7 more
Fatal error during transformation: java.lang.RuntimeException: Internal error evaluating template rule 

I attached a .zip file so you can reproduce the error.

The two command lines we are using are in the .bat file.

If -relocate option is set to "on", the .sef is created but its execution fails.

If it is set to "off", the execution works fine.

Basically, the stylesheet does a result-document under certain circumstances. The @href is computed from the parameters $outputDirPath and $input-name. Whether $outputDirPath is a relative URI ("." in the example) or an absolute one (ex.: "file:/C:/path/to/dir") does not prevent the execution from failing.

There is also a third commented command line in the .bat, which exports the .sef and does the transformation "at the same time". This works fine even with the ~~relocate:on option ~~ but I guess it's not the .sef file that is indeed used for the execution phase.

Thank you for your time investigating this.

Regards,

Axel

Please register to edit this issue

Also available in: Atom PDF