Hi,
I recently updated to Saxon-HE 9.8.0-1 from Saxon-HE 9.4.0.1 and I am getting an exception when attempting to load one of the spreadsheets that I was using before.
I have tracked down the issue to the following stylesheet (simplified use case to reproduce the error, I know the stylesheet makes no sense as is):
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:test="http://test" exclude-result-prefixes="xs test" version="2.0"> <xsl:function name="test:getFontName" as="xs:string"> <xsl:variable name="fontName" select="tokenize(' abc', '\s*,\s*')[1]"/> <xsl:value-of select="$fontName"/> </xsl:function> </xsl:stylesheet>
The Java code that I'm using to create the transformer is taken from the examples:
Processor proc = new Processor(false); XsltCompiler comp = proc.newXsltCompiler(); XsltExecutable exec = comp.compile(new StreamSource(new File("validator.xsl"))); XsltTransformer trans = exec.load();
The exception message I get is:
Exception in thread "main" java.lang.ExceptionInInitializerError
at net.sf.saxon.regex.RECompiler.escape(RECompiler.java:348)
at net.sf.saxon.regex.RECompiler.parseTerminal(RECompiler.java:930)
at net.sf.saxon.regex.RECompiler.piece(RECompiler.java:971)
at net.sf.saxon.regex.RECompiler.parseBranch(RECompiler.java:1091)
at net.sf.saxon.regex.RECompiler.parseExpr(RECompiler.java:1141)
at net.sf.saxon.regex.RECompiler.compile(RECompiler.java:1273)
at net.sf.saxon.regex.ARegularExpression.<init>(ARegularExpression.java:50)
at net.sf.saxon.java.JavaPlatform.compileRegularExpression(JavaPlatform.java:326)
at net.sf.saxon.functions.RegexFunction.tryToBindRegularExpression(RegexFunction.java:48)
at net.sf.saxon.functions.RegexFunction.makeFunctionCall(RegexFunction.java:71)
at net.sf.saxon.functions.RegexFunctionSansFlags.makeFunctionCall(RegexFunctionSansFlags.java:47)
at net.sf.saxon.functions.registry.BuiltInFunctionSet.bind(BuiltInFunctionSet.java:188)
at net.sf.saxon.functions.FunctionLibraryList.bind(FunctionLibraryList.java:105)
at net.sf.saxon.expr.parser.XPathParser.parseFunctionCall(XPathParser.java:3187)
at net.sf.saxon.expr.parser.XPathParser.parseBasicStep(XPathParser.java:2074)
at net.sf.saxon.expr.parser.XPathParser.parseStepExpression(XPathParser.java:1955)
at net.sf.saxon.expr.parser.XPathParser.parseRelativePath(XPathParser.java:1880)
at net.sf.saxon.expr.parser.XPathParser.parsePathExpression(XPathParser.java:1842)
at net.sf.saxon.expr.parser.XPathParser.parseSimpleMappingExpression(XPathParser.java:1856)
at net.sf.saxon.expr.parser.XPathParser.parseUnaryExpression(XPathParser.java:1711)
at net.sf.saxon.expr.parser.XPathParser.parseExprSingle(XPathParser.java:658)
at net.sf.saxon.expr.parser.XPathParser.parseExpression(XPathParser.java:593)
at net.sf.saxon.expr.parser.XPathParser.parse(XPathParser.java:464)
at net.sf.saxon.expr.parser.ExpressionTool.make(ExpressionTool.java:103)
at net.sf.saxon.style.StyleElement.makeExpression(StyleElement.java:754)
at net.sf.saxon.style.SourceBinding.prepareAttributes(SourceBinding.java:123)
at net.sf.saxon.style.XSLLocalVariable.prepareAttributes(XSLLocalVariable.java:53)
at net.sf.saxon.style.StyleElement.processAttributes(StyleElement.java:628)
at net.sf.saxon.style.StyleElement.processAllAttributes(StyleElement.java:573)
at net.sf.saxon.style.StyleElement.processAllAttributes(StyleElement.java:578)
at net.sf.saxon.style.PrincipalStylesheetModule.processAllAttributes(PrincipalStylesheetModule.java:602)
at net.sf.saxon.style.PrincipalStylesheetModule.preprocess(PrincipalStylesheetModule.java:375)
at net.sf.saxon.style.Compilation.compilePackage(Compilation.java:288)
at net.sf.saxon.style.StylesheetModule.loadStylesheet(StylesheetModule.java:257)
at net.sf.saxon.style.Compilation.compileSingletonPackage(Compilation.java:106)
at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:743)
at ni.saxontest.Main.main(Main.java:20)
Caused by: java.lang.RuntimeException: Unable to read categories.xml file
at net.sf.saxon.regex.charclass.Categories.build(Categories.java:116)
at net.sf.saxon.regex.charclass.Categories.getCategory(Categories.java:206)
at net.sf.saxon.regex.charclass.Categories.<clinit>(Categories.java:180)
... 37 more
Can you help me figure out what the issue is and how to solve it?
Thanks,
Francisco
Anonymous
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
Please use saxonica.plan.io for support requests.
This is a known error in the build for Maven and .NET. Please see https://saxonica.plan.io/issues/3283 and the related #3252. It will be fixed in the first maintenance release. The Saxon-HE 9.8.0.1 build on SourceForge is working.