https://saxonica.plan.io/https://saxonica.plan.io/favicon.ico2021-05-04T21:38:14ZSaxonica Developer CommunitySaxon - Bug #4983: Unable to read categories.xml file with Saxon HE 10.5 .NET Query.exehttps://saxonica.plan.io/issues/4983?journal_id=179062021-05-04T21:38:14ZMartin Honnenmartin.honnen@gmx.de
<ul></ul><p>The code</p>
<pre><code>let $xsl :=
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"
xmlns:functx="http://www.functx.com"
xmlns:mf="http://example.com/mf"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="#all">
<xsl:import href="http://www.xsltfunctions.com/xsl/functx-1.0-nodoc-2007-01.xsl"/>
<xsl:function name="mf:words-to-camel-case" as="xs:string" visibility="public">
<xsl:param name="input" as="xs:string"/>
<xsl:sequence select="functx:words-to-camel-case($input)"/>
</xsl:function>
</xsl:stylesheet>
return
transform(
map {
'stylesheet-node' : $xsl,
'initial-function' : QName('http://example.com/mf', 'words-to-camel-case'),
'delivery-format' : 'raw',
'function-params' : ['This is a text with some words']
})?output
</code></pre>
<p>when run through Saxon 10.5 HE .NET Query causes the error</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
Unbehandelte Ausnahme: System.TypeInitializationException: Der Typeninitialisierer für "net.sf.saxon.regex.charclass.Categories" hat eine Ausnahme verursacht. ---> java.lang.RuntimeException: Unable to read categories.xml file
bei net.sf.saxon.regex.charclass.Categories.build()
bei net.sf.saxon.regex.charclass.Categories.getCategory(String cat)
bei net.sf.saxon.regex.charclass.Categories..cctor()
--- Ende der internen Ausnahmestapelüberwachung ---
bei net.sf.saxon.regex.charclass.Categories.getCategory(String cat)
bei net.sf.saxon.regex.RECompiler.escape(Boolean )
bei net.sf.saxon.regex.RECompiler.parseTerminal(Int32[] )
bei net.sf.saxon.regex.RECompiler.piece(Int32[] )
bei net.sf.saxon.regex.RECompiler.parseBranch()
bei net.sf.saxon.regex.RECompiler.parseExpr(Int32[] )
bei net.sf.saxon.regex.RECompiler.parseTerminal(Int32[] )
bei net.sf.saxon.regex.RECompiler.piece(Int32[] )
bei net.sf.saxon.regex.RECompiler.parseBranch()
bei net.sf.saxon.regex.RECompiler.parseExpr(Int32[] )
bei net.sf.saxon.regex.RECompiler.compile(UnicodeString pattern)
bei net.sf.saxon.regex.ARegularExpression..ctor(CharSequence pattern, String flags, String hostLanguage, List warnings, Configuration config)
bei net.sf.saxon.dotnet.DotNetPlatform.compileRegularExpression(Configuration config, CharSequence regex, String flags, String hostLanguage, List warnings)
bei net.sf.saxon.Configuration.compileRegularExpression(CharSequence regex, String flags, String hostLanguage, List warnings)
bei net.sf.saxon.functions.RegexFunction.tryToBindRegularExpression(Expression[] )
bei net.sf.saxon.functions.RegexFunction.makeFunctionCall(Expression[] arguments)
bei net.sf.saxon.functions.Replace.makeFunctionCall(Expression[] arguments)
bei net.sf.saxon.functions.RegexFunctionSansFlags.makeFunctionCall(Expression[] arguments)
bei net.sf.saxon.functions.registry.BuiltInFunctionSet.bind(F symbolicName, Expression[] staticArgs, StaticContext env, List reasons)
bei net.sf.saxon.functions.FunctionLibraryList.bind(F functionName, Expression[] staticArgs, StaticContext env, List reasons)
bei net.sf.saxon.expr.parser.XPathParser.parseFunctionCall(Expression prefixArgument)
bei net.sf.saxon.expr.parser.XPathParser.parseBasicStep(Boolean firstInPattern)
bei net.sf.saxon.expr.parser.XPathParser.parseStepExpression(Boolean firstInPattern)
bei net.sf.saxon.expr.parser.XPathParser.parseRelativePath()
bei net.sf.saxon.expr.parser.XPathParser.parsePathExpression()
bei net.sf.saxon.expr.parser.XPathParser.parseSimpleMappingExpression()
bei net.sf.saxon.expr.parser.XPathParser.parseUnaryExpression()
bei net.sf.saxon.expr.parser.XPathParser.parseExprSingle()
bei net.sf.saxon.expr.parser.XPathParser.parseFunctionArgument()
bei net.sf.saxon.expr.parser.XPathParser.parseFunctionCall(Expression prefixArgument)
bei net.sf.saxon.expr.parser.XPathParser.parseBasicStep(Boolean firstInPattern)
bei net.sf.saxon.expr.parser.XPathParser.parseStepExpression(Boolean firstInPattern)
bei net.sf.saxon.expr.parser.XPathParser.parseRelativePath()
bei net.sf.saxon.expr.parser.XPathParser.parsePathExpression()
bei net.sf.saxon.expr.parser.XPathParser.parseSimpleMappingExpression()
bei net.sf.saxon.expr.parser.XPathParser.parseUnaryExpression()
bei net.sf.saxon.expr.parser.XPathParser.parseExprSingle()
bei net.sf.saxon.expr.parser.XPathParser.parseExpression()
bei net.sf.saxon.expr.parser.XPathParser.parse(String expression, Int32 start, Int32 terminator, StaticContext env)
bei net.sf.saxon.expr.parser.ExpressionTool.make(String expression, StaticContext env, Int32 start, Int32 terminator, CodeInjector codeInjector)
bei net.sf.saxon.style.StyleElement.makeExpression(String expression, AttributeInfo att)
bei net.sf.saxon.style.XSLSequence.prepareAttributes()
bei net.sf.saxon.style.StyleElement.processAttributes()
bei net.sf.saxon.style.StyleElement.processAllAttributes()
bei net.sf.saxon.style.StyleElement.processAllAttributes()
bei net.sf.saxon.style.PrincipalStylesheetModule.processAllAttributes()
bei net.sf.saxon.style.PrincipalStylesheetModule.preprocess(Compilation compilation)
bei net.sf.saxon.style.Compilation.compilePackage(Source source)
bei net.sf.saxon.style.StylesheetModule.loadStylesheet(Source styleSource, Compilation compilation)
bei net.sf.saxon.style.Compilation.compileSingletonPackage(Configuration config, CompilerInfo compilerInfo, Source source)
bei net.sf.saxon.s9api.XsltCompiler.compile(Source source)
bei net.sf.saxon.functions.TransformFn.getStylesheet(Map , XsltCompiler , String , XPathContext )
bei net.sf.saxon.functions.TransformFn.call(XPathContext context, Sequence[] arguments)
bei net.sf.saxon.expr.FunctionCall.iterate(XPathContext context)
bei net.sf.saxon.expr.Expression.evaluateItem(XPathContext context)
bei net.sf.saxon.expr.LookupExpression.iterate(XPathContext context)
bei net.sf.saxon.expr.Expression.process(Outputter output, XPathContext context)
bei net.sf.saxon.query.XQueryExpression.run(DynamicQueryContext env, Result result, Properties outputProperties)
bei net.sf.saxon.s9api.XQueryEvaluator.run(Destination destination)
bei net.sf.saxon.Query.runQuery(XQueryExecutable exp, XQueryEvaluator evaluator, Source input, Destination destination)
bei net.sf.saxon.Query.doQuery(String[] args, String command)
bei Saxon.Cmd.DotNetQuery.Main(String[] args)
</code></pre> Saxon - Bug #4983: Unable to read categories.xml file with Saxon HE 10.5 .NET Query.exehttps://saxonica.plan.io/issues/4983?journal_id=179072021-05-04T21:39:57ZMartin Honnenmartin.honnen@gmx.de
<ul></ul><p>Somehow I have managed to fumble a shortened title into this issue, I can't seem to edit it: should say: "Unable to read categories.xml file with Saxon HE 10.5 .NET Query.exe"</p> Saxon - Bug #4983: Unable to read categories.xml file with Saxon HE 10.5 .NET Query.exehttps://saxonica.plan.io/issues/4983?journal_id=179082021-05-04T21:42:59ZMartin Honnenmartin.honnen@gmx.de
<ul></ul><p>Works fine with 10.3 .NET.</p> Saxon - Bug #4983: Unable to read categories.xml file with Saxon HE 10.5 .NET Query.exehttps://saxonica.plan.io/issues/4983?journal_id=179092021-05-04T21:44:39ZMichael Kaymike@saxonica.com
<ul><li><strong>Subject</strong> changed from <i>categ</i> to <i>Unable to read categories.xml file with Saxon HE 10.5 .NET Query.exe</i></li></ul> Saxon - Bug #4983: Unable to read categories.xml file with Saxon HE 10.5 .NET Query.exehttps://saxonica.plan.io/issues/4983?journal_id=179102021-05-04T21:48:18ZMichael Kaymike@saxonica.com
<ul></ul><p>Thanks for reporting it. Looks like a build error - we've rewritten all the build scripts in Gradle. The scripts do a lot of self-testing (a lot more than we used to do), so the failure is certainly surprising, but I think it must be in that area.</p> Saxon - Bug #4983: Unable to read categories.xml file with Saxon HE 10.5 .NET Query.exehttps://saxonica.plan.io/issues/4983?journal_id=179162021-05-05T19:12:15ZMartin Honnenmartin.honnen@gmx.de
<ul></ul><p>Much shorter, reduced example triggering the exception is</p>
<pre><code class="xml syntaxhl" data-language="xml"><span class="nt"><xsl:stylesheet</span> <span class="na">xmlns:xsl=</span><span class="s">"http://www.w3.org/1999/XSL/Transform"</span> <span class="na">version=</span><span class="s">"3.0"</span>
<span class="na">xmlns:xs=</span><span class="s">"http://www.w3.org/2001/XMLSchema"</span>
<span class="na">exclude-result-prefixes=</span><span class="s">"#all"</span><span class="nt">></span>
<span class="nt"><xsl:param</span> <span class="na">name=</span><span class="s">"input-string"</span> <span class="na">as=</span><span class="s">"xs:string"</span><span class="nt">></span>This is a text with some words<span class="nt"></xsl:param></span>
<span class="nt"><xsl:template</span> <span class="na">name=</span><span class="s">"xsl:initial-template"</span><span class="nt">></span>
<span class="nt"><xsl:value-of</span> <span class="na">select=</span><span class="s">"tokenize($input-string, '\s+')"</span><span class="nt">/></span>
<span class="nt"></xsl:template></span>
<span class="nt"></xsl:stylesheet></span>
</code></pre>
<p>when run with Saxon Java HE 10.5 and e.g. <code>-it -xsl:above-code.xsl</code> it works fine, with Saxon .NET HE 10.5 <code>Transform.exe</code> it fails with</p>
<pre><code>Unbehandelte Ausnahme: System.TypeInitializationException: Der Typeninitialisierer für "net.sf.saxon.regex.charclass.Categories" hat eine Ausnahme verursacht. ---> java.lang.RuntimeException: Unable to read categories.xml file
bei net.sf.saxon.regex.charclass.Categories.build()
bei net.sf.saxon.regex.charclass.Categories.getCategory(String cat)
bei net.sf.saxon.regex.charclass.Categories..cctor()
--- Ende der internen Ausnahmestapelüberwachung ---
bei net.sf.saxon.regex.RECompiler.escape(Boolean )
bei net.sf.saxon.regex.RECompiler.parseTerminal(Int32[] )
bei net.sf.saxon.regex.RECompiler.piece(Int32[] )
bei net.sf.saxon.regex.RECompiler.parseBranch()
bei net.sf.saxon.regex.RECompiler.parseExpr(Int32[] )
bei net.sf.saxon.regex.RECompiler.compile(UnicodeString pattern)
bei net.sf.saxon.regex.ARegularExpression..ctor(CharSequence pattern, String flags, String hostLanguage, List warnings, Configuration config)
bei net.sf.saxon.dotnet.DotNetPlatform.compileRegularExpression(Configuration config, CharSequence regex, String flags, String hostLanguage, List warnings)
bei net.sf.saxon.Configuration.compileRegularExpression(CharSequence regex, String flags, String hostLanguage, List warnings)
bei net.sf.saxon.functions.RegexFunction.tryToBindRegularExpression(Expression[] )
bei net.sf.saxon.functions.RegexFunction.makeFunctionCall(Expression[] arguments)
bei net.sf.saxon.functions.RegexFunctionSansFlags.makeFunctionCall(Expression[] arguments)
bei net.sf.saxon.functions.registry.BuiltInFunctionSet.bind(F symbolicName, Expression[] staticArgs, StaticContext env, List reasons)
bei net.sf.saxon.functions.FunctionLibraryList.bind(F functionName, Expression[] staticArgs, StaticContext env, List bei net.sf.saxon.expr.parser.XPathParser.parseFunctionCall(Expression prefixArgument)
bei net.sf.saxon.expr.parser.XPathParser.parseBasicStep(Boolean firstInPattern)
bei net.sf.saxon.expr.parser.XPathParser.parseStepExpression(Boolean firstInPattern)
bei net.sf.saxon.expr.parser.XPathParser.parseRelativePath()
bei net.sf.saxon.expr.parser.XPathParser.parsePathExpression()
bei net.sf.saxon.expr.parser.XPathParser.parseSimpleMappingExpression()
bei net.sf.saxon.expr.parser.XPathParser.parseUnaryExpression()
bei net.sf.saxon.expr.parser.XPathParser.parseExprSingle()
bei net.sf.saxon.expr.parser.XPathParser.parseExpression()
bei net.sf.saxon.expr.parser.XPathParser.parse(String expression, Int32 start, Int32 terminator, StaticContext env)
bei net.sf.saxon.expr.parser.ExpressionTool.make(String expression, StaticContext env, Int32 start, Int32 terminator, CodeInjector codeInjector)
bei net.sf.saxon.style.StyleElement.makeExpression(String expression, AttributeInfo att)
bei net.sf.saxon.style.XSLValueOf.prepareAttributes()
bei net.sf.saxon.style.StyleElement.processAttributes()
bei net.sf.saxon.style.StyleElement.processAllAttributes()
bei net.sf.saxon.style.StyleElement.processAllAttributes()
bei net.sf.saxon.style.XSLTemplate.processAllAttributes()
bei net.sf.saxon.style.PrincipalStylesheetModule.processAllAttributes()
bei net.sf.saxon.style.PrincipalStylesheetModule.preprocess(Compilation compilation)
bei net.sf.saxon.style.Compilation.compilePackage(Source source)
bei net.sf.saxon.style.StylesheetModule.loadStylesheet(Source styleSource, Compilation compilation)
bei net.sf.saxon.style.Compilation.compileSingletonPackage(Configuration config, CompilerInfo compilerInfo, Source source)
bei net.sf.saxon.s9api.XsltCompiler.compile(Source source)
bei net.sf.saxon.Transform.doTransform(String[] args, String command)
bei Saxon.Cmd.DotNetTransform.Main(String[] args)
</code></pre> Saxon - Bug #4983: Unable to read categories.xml file with Saxon HE 10.5 .NET Query.exehttps://saxonica.plan.io/issues/4983?journal_id=179172021-05-06T08:20:43ZO'Neil Delprattoneil@saxonica.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li><li><strong>Priority</strong> changed from <i>Low</i> to <i>Normal</i></li><li><strong>Applies to branch</strong> <i>10</i> added</li></ul><p>Hi Martin,</p>
<p>I ran the simple stylesheet you have supplied against all are .NET products:</p>
<ul>
<li>Saxon-HE - reproduced exception as described in comment #6</li>
<li>Saxon-PE - Succeeds</li>
<li>Saxon-EE - Succeeds</li>
</ul>
<p>As Mike mentioned it is a build issue.</p> Saxon - Bug #4983: Unable to read categories.xml file with Saxon HE 10.5 .NET Query.exehttps://saxonica.plan.io/issues/4983?journal_id=179182021-05-06T08:37:25ZO'Neil Delprattoneil@saxonica.com
<ul><li><strong>Category</strong> set to <i>Build and release</i></li><li><strong>Assignee</strong> set to <i>O'Neil Delpratt</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li><li><strong>Fix Committed on Branch</strong> <i>10</i> added</li></ul><p>In the gradle task <code>hen_jar</code> we are missing the following:</p>
<pre><code> from ("src/main/resources") {
include "net/sf/saxon/data/**"
}
</code></pre>
<p>Fixed in the file build-n.gradle and available for the next maintenance release. There seems to some gaps on the testing side on .NET for Saxon-HEN especially in the build scripts, which we will address.</p> Saxon - Bug #4983: Unable to read categories.xml file with Saxon HE 10.5 .NET Query.exehttps://saxonica.plan.io/issues/4983?journal_id=179212021-05-06T17:28:52ZO'Neil Delprattoneil@saxonica.com
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Closed</i></li><li><strong>Fixed in Maintenance Release</strong> <i>10.5.1</i> added</li></ul><p>Bug fixed in the gradle build script.</p>
<p>We have made available on Sourceforge and Nuget a special Saxon-HEN 10.5.1 release with this fix.</p>