Saxonica Developer Community: Issueshttps://saxonica.plan.io/https://saxonica.plan.io/favicon.ico2024-03-27T11:18:36ZSaxonica Developer Community
Planio Saxon - Bug #6379 (New): Default implementation of fn:deep-equalhttps://saxonica.plan.io/issues/63792024-03-27T11:18:36ZNorm Tovey-Walsh
<p>I happened to trace my way through a call to deep equal in Saxon HE 12.4 and I was a little bit surprised to find that it's using the <code>DeepEqual40</code> implementation. I wonder if that was intentional...</p> Saxon - Support #6376 (In Progress): Xslt Map Memory Footprinthttps://saxonica.plan.io/issues/63762024-03-22T14:42:37Zfouad MOUTASSIM
<p>Hello,</p>
<p>We are using Saxonica 10.4 with Java and have noticed that it consumes a lot of memory when running.
For example, when processing a payload of 100MB, the map consumes 1.3GB, which causes memory issues in our application.</p>
<p>We kindly request your support in addressing this matter.</p>
<p>Please find attached the following elements:</p>
<p>The XSLT map.
The Java class.
The input payload.
Thank you in advance for your support.</p> Saxon - Bug #6361 (In Progress): XPath parser continously looping to find Xpath function library ...https://saxonica.plan.io/issues/63612024-02-27T09:32:05ZManikandan S
<ul>
<li>I am trying to load a custom library of XPath functions in my project using a custom build jar. However when the function is called to load the XPath functions i get redirected to XPathParser.java class which is present in the package net.sf.saxon.expr.parser, where a function is called - reportMissingFunction which consist of the following loop and it never exits this loop even though it could not find the a particular XPath function.</li>
<li>Jar file is located in classpath under JVM_PARAMS, Xpath function is able to find that jar from classPath.</li>
</ul>
<pre><code class="java syntaxhl" data-language="java"> <span class="k">if</span> <span class="o">(</span><span class="n">config</span><span class="o">.</span><span class="na">getBooleanProperty</span><span class="o">(</span><span class="nc">Feature</span><span class="o">.</span><span class="na">ALLOW_EXTERNAL_FUNCTIONS</span><span class="o">))</span> <span class="o">{</span>
<span class="kt">boolean</span> <span class="n">existsWithDifferentArity</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
<span class="k">for</span><span class="o">(</span><span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span> <span class="n">i</span> <span class="o"><</span> <span class="n">arguments</span><span class="o">.</span><span class="na">length</span> <span class="o">+</span> <span class="mi">5</span><span class="o">;</span> <span class="o">++</span><span class="n">i</span><span class="o">)</span> <span class="o">{</span>
<span class="k">if</span> <span class="o">(</span><span class="n">i</span> <span class="o">!=</span> <span class="n">arguments</span><span class="o">.</span><span class="na">length</span><span class="o">)</span> <span class="o">{</span>
<span class="nc">SymbolicName</span><span class="o">.</span><span class="na">F</span> <span class="n">sn</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">SymbolicName</span><span class="o">.</span><span class="na">F</span><span class="o">(</span><span class="n">functionName</span><span class="o">,</span> <span class="n">i</span><span class="o">);</span>
<span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="na">env</span><span class="o">.</span><span class="na">getFunctionLibrary</span><span class="o">().</span><span class="na">isAvailable</span><span class="o">(</span><span class="n">sn</span><span class="o">))</span> <span class="o">{</span>
<span class="n">existsWithDifferentArity</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
<span class="k">break</span><span class="o">;</span>
<span class="o">}</span>
<span class="o">}</span>
<span class="o">}</span>
<span class="k">if</span> <span class="o">(</span><span class="n">existsWithDifferentArity</span><span class="o">)</span> <span class="o">{</span>
<span class="n">sb</span><span class="o">.</span><span class="na">append</span><span class="o">(</span><span class="s">". The namespace URI and local name are recognized, but the number of arguments is wrong"</span><span class="o">);</span>
<span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
<span class="n">supplementary</span> <span class="o">=</span> <span class="n">getMissingFunctionExplanation</span><span class="o">(</span><span class="n">functionName</span><span class="o">,</span> <span class="n">config</span><span class="o">);</span>
<span class="k">if</span> <span class="o">(</span><span class="n">supplementary</span> <span class="o">!=</span> <span class="kc">null</span><span class="o">)</span> <span class="o">{</span>
<span class="n">sb</span><span class="o">.</span><span class="na">append</span><span class="o">(</span><span class="s">". "</span><span class="o">).</span><span class="na">append</span><span class="o">(</span><span class="n">supplementary</span><span class="o">);</span>
<span class="o">}</span>
<span class="o">}</span>
<span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
<span class="n">sb</span><span class="o">.</span><span class="na">append</span><span class="o">(</span><span class="s">". External function calls have been disabled"</span><span class="o">);</span>
<span class="o">}</span>
</code></pre>
<ul>
<li>I do not understand whats going on and my application freezes since it is always stuck in the for-loop.</li>
<li>I am expecting either the function to be found and exit the for-loop and continue the normal behavior of my application or some timeout to be set or an error message to be thrown if the XPath functions are not found in that loop.</li>
<li>Please let me know your suggestion on how to proceed.</li>
<li>I'm using Saxon 10.6 and Xpath 3.0</li>
</ul>
<p><strong>Note:</strong> Here I'm using custom library(External Jar file) which inside the class path contains some Xpath functions, not modified anything on Saxon FunctionLibrary interface.</p>
<p><strong>Stack overflow ticket :</strong> <a href="https://stackoverflow.com/questions/78001210/xpath-parser-continously-looping-to-find-xpath-function-library-in-a-given-custo?noredirect=1#comment137514388_78001210" class="external">https://stackoverflow.com/questions/78001210/xpath-parser-continously-looping-to-find-xpath-function-library-in-a-given-custo?noredirect=1#comment137514388_78001210</a></p> Saxon - Bug #6323 (AwaitingInfo): Nullpointer Exceptionhttps://saxonica.plan.io/issues/63232024-01-18T15:48:06ZUrvish Amin
<p>We are getting NullPointerException , see below. It doesnt give much information about which attribute or specific item it fails. Let us know what could be an issue or how to debug this issue. Can we get source code so we can debug code and see for which element it fails? I have attached our xslt files.</p>
<h2>--
Caused by: java.lang.NullPointerException: Cannot invoke "net.sf.saxon.om.Sequence.makeRepeatable()" because "value" is null
at net.sf.saxon.expr.XPathContextMinor.setLocalVariable(XPathContextMinor.java:374) ~[Saxon-EE-11.6.jar:?]</h2>
<p>2024-01-17T05:44:13,566 ERROR [ESLA] [TEMLC-W-CSP_tst821_ESLA_REQUEST_IO_CSS-FROM-ULDD_COMPLETED_IN-5] ?#:
Handling Message: bpid=IOUTILITY 1000 bpMsgId=5f964850-5841-4fee-beef-cc2ef745f25e entityNameType=request.io.css-from-uldd entityState=COMPLETED entityIdentifiers=RequestIdentifier=WebService-FRE_1.13.1_FRM_3138W9X88_201309_10L_1of1_P1W_SWCWI_ONE__V11.3_14.2_14.1_02272017_ShelfOnly_DATA.xml
Transformation failure for RqstPrcsID::10184
com.css.csp.interfaces.transform.InterfacesWrapperTransformerException: Error transforming with compiled templates
at com.css.csp.interfaces.transform.XSLTTransformer.transformCompiled(XSLTTransformer.java:682) ~[interfaces-transformer-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.transform.XSLTTransformer.transformCompiled(XSLTTransformer.java:649) ~[interfaces-transformer-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.transform.service.TransformationService.transform(TransformationService.java:63) ~[interfaces-transformer-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.processor.TransformerAndValidatorUtil.transformAndValidate(TransformerAndValidatorUtil.java:146) ~[interfaces-base-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.processor.SplitterAndTransformer.processMessage(SplitterAndTransformer.java:93) ~[interfaces-base-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.processor.GenericSplitterAndTransformer.processMessage(GenericSplitterAndTransformer.java:92) ~[interfaces-base-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.eventmgmt.impl.EventHandler.processMessage(EventHandler.java:100) ~[interfaces-base-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.eventmgmt.EventRouter.processMessage(EventRouter.java:77) ~[interfaces-base-24.3.0-RC4.jar:24.3.0-RC4]
at jdk.internal.reflect.GeneratedMethodAccessor189.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:241) ~[spring-aop-5.3.29.jar:5.3.29]
at jdk.proxy3.$Proxy97.processMessage(Unknown Source) ~[?:?]
at com.css.csp.interfaces.spring.EventObjectListener.onMessage(EventObjectListener.java:42) ~[interfaces-base-24.3.0-RC4.jar:24.3.0-RC4]
at jdk.internal.reflect.GeneratedMethodAccessor192.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:169) ~[spring-messaging-5.3.29.jar:5.3.29]
at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:119) ~[spring-messaging-5.3.29.jar:5.3.29]
at org.springframework.integration.handler.support.MessagingMethodInvokerHelper$HandlerMethod.invoke(MessagingMethodInvokerHelper.java:1103) ~[spring-integration-core-5.5.18.jar:5.5.18]
at org.springframework.integration.handler.support.MessagingMethodInvokerHelper.invokeHandlerMethod(MessagingMethodInvokerHelper.java:585) ~[spring-integration-core-5.5.18.jar:5.5.18]
at org.springframework.integration.handler.support.MessagingMethodInvokerHelper.processInternal(MessagingMethodInvokerHelper.java:480) ~[spring-integration-core-5.5.18.jar:5.5.18]
at org.springframework.integration.handler.support.MessagingMethodInvokerHelper.process(MessagingMethodInvokerHelper.java:358) ~[spring-integration-core-5.5.18.jar:5.5.18]
at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:110) ~[spring-integration-core-5.5.18.jar:5.5.18]
at org.springframework.integration.handler.ServiceActivatingHandler.handleRequestMessage(ServiceActivatingHandler.java:105) ~[spring-integration-core-5.5.18.jar:5.5.18]
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:136) ~[spring-integration-core-5.5.18.jar:5.5.18]
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:55) ~[spring-integration-core-5.5.18.jar:5.5.18]
at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:115) ~[spring-integration-core-5.5.18.jar:5.5.18]
at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:133) ~[spring-integration-core-5.5.18.jar:5.5.18]
at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:106) ~[spring-integration-core-5.5.18.jar:5.5.18]
at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:72) ~[spring-integration-core-5.5.18.jar:5.5.18]
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:317) ~[spring-integration-core-5.5.18.jar:5.5.18]
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:272) ~[spring-integration-core-5.5.18.jar:5.5.18]
at com.css.csp.interfaces.spring.ChannelMessageSender.sendOutMessage(ChannelMessageSender.java:40) ~[interfaces-base-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.eventmgmt.EventRouter.sendMessage(EventRouter.java:112) ~[interfaces-base-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.eventmgmt.impl.EventHandler.extractAndSendImmediateEvents(EventHandler.java:222) ~[interfaces-base-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.eventmgmt.impl.EventHandler.processMessage(EventHandler.java:114) ~[interfaces-base-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.eventmgmt.EventRouter.processMessage(EventRouter.java:77) ~[interfaces-base-24.3.0-RC4.jar:24.3.0-RC4]
at jdk.internal.reflect.GeneratedMethodAccessor189.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:241) ~[spring-aop-5.3.29.jar:5.3.29]
at jdk.proxy3.$Proxy97.processMessage(Unknown Source) ~[?:?]
at com.css.csp.interfaces.eventmgmt.EventRouterInvoker.processMessage(EventRouterInvoker.java:47) ~[interfaces-base-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.processor.IOEventExtractorProcessor.createULDDEvent(IOEventExtractorProcessor.java:118) ~[interfaces-base-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.processor.IOEventExtractorProcessor.processMessage(IOEventExtractorProcessor.java:66) ~[interfaces-base-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.eventmgmt.impl.EventHandler.processMessage(EventHandler.java:100) ~[interfaces-base-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.eventmgmt.EventRouter.processMessage(EventRouter.java:77) ~[interfaces-base-24.3.0-RC4.jar:24.3.0-RC4]
at jdk.internal.reflect.GeneratedMethodAccessor189.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.29.jar:5.3.29]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:241) ~[spring-aop-5.3.29.jar:5.3.29]
at jdk.proxy3.$Proxy97.processMessage(Unknown Source) ~[?:?]
at com.css.csp.interfaces.appframework.handlers.AbstractEventHandler.dispatchTask(AbstractEventHandler.java:137) ~[interfaces-base-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.appframework.handlers.RequestIoCssFromUlddReceivedToCompletedEventHandler.handleEvent(RequestIoCssFromUlddReceivedToCompletedEventHandler.java:56) ~[interfaces-base-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.appframework.handlers.RequestIoCssFromUlddReceivedToCompletedEventHandler.handleEvent(RequestIoCssFromUlddReceivedToCompletedEventHandler.java:31) ~[interfaces-base-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.appframework.internal.jms.handling.DefaultEventLifecycleHandler.handle(DefaultEventLifecycleHandler.java:131) ~[appframework-core-24.3.0.jar:24.3.0]
at com.css.csp.appframework.internal.jms.EventLifecycleManager.processEvent(EventLifecycleManager.java:211) ~[appframework-core-24.3.0.jar:24.3.0]
at com.css.csp.appframework.internal.messaging.aws.AwsMessagingListener.onMessage(AwsMessagingListener.java:94) ~[appframework-core-24.3.0.jar:24.3.0]
at jdk.internal.reflect.GeneratedMethodAccessor196.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:169) ~[spring-messaging-5.3.29.jar:5.3.29]
at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:119) ~[spring-messaging-5.3.29.jar:5.3.29]
at org.springframework.messaging.handler.invocation.AbstractMethodMessageHandler.handleMatch(AbstractMethodMessageHandler.java:569) ~[spring-messaging-5.3.29.jar:5.3.29]
at org.springframework.messaging.handler.invocation.AbstractMethodMessageHandler.handleMessageInternal(AbstractMethodMessageHandler.java:524) ~[spring-messaging-5.3.29.jar:5.3.29]
at org.springframework.messaging.handler.invocation.AbstractMethodMessageHandler.handleMessage(AbstractMethodMessageHandler.java:458) ~[spring-messaging-5.3.29.jar:5.3.29]
at com.css.csp.appframework.internal.messaging.aws.TransactionEmulatedMessageListenerContainer.executeMessage(TransactionEmulatedMessageListenerContainer.java:338) ~[appframework-core-24.3.0.jar:24.3.0]
at com.css.csp.appframework.internal.messaging.aws.TransactionEmulatedMessageListenerContainer$MessageExecutor.run(TransactionEmulatedMessageListenerContainer.java:711) ~[appframework-core-24.3.0.jar:24.3.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.IllegalStateException: java.lang.RuntimeException: Internal error evaluating template rule at line 7 in module jar:file:/opt/catalina/webapps/interfaces-web/WEB-INF/lib/interfaces-transformer-24.3.0-RC4.jar!/stylesheets/facade/Int-1.13.1-SecurityReadyPayloadBuilderFacade.xsl
at net.sf.saxon.resource.ActiveSAXSource.deliver(ActiveSAXSource.java:233) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.event.Sender.send(Sender.java:105) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.jaxp.IdentityTransformer.transform(IdentityTransformer.java:364) ~[Saxon-EE-11.6.jar:?]
at com.css.csp.interfaces.transform.XSLTTransformer._transform(XSLTTransformer.java:836) ~[interfaces-transformer-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.transform.XSLTTransformer._transform(XSLTTransformer.java:867) ~[interfaces-transformer-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.transform.XSLTTransformer.transformCompiled(XSLTTransformer.java:680) ~[interfaces-transformer-24.3.0-RC4.jar:24.3.0-RC4]
... 94 more
Caused by: java.lang.RuntimeException: Internal error evaluating template rule at line 7 in module jar:file:/opt/catalina/webapps/interfaces-web/WEB-INF/lib/interfaces-transformer-24.3.0-RC4.jar!/stylesheets/facade/Int-1.13.1-SecurityReadyPayloadBuilderFacade.xsl
at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:411) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:551) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.trans.XsltController.applyTemplates(XsltController.java:685) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.s9api.AbstractXsltTransformer.applyTemplatesToSource(AbstractXsltTransformer.java:422) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:359) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.jaxp.TransformerImpl.transform(TransformerImpl.java:75) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.jaxp.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:185) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.event.ContentHandlerProxy.close(ContentHandlerProxy.java:298) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.event.ProxyReceiver.close(ProxyReceiver.java:104) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.event.SequenceNormalizer.close(SequenceNormalizer.java:160) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.event.ReceivingContentHandler.endDocument(ReceivingContentHandler.java:269) ~[Saxon-EE-11.6.jar:?]
at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source) ~[xercesImpl-2.12.0.jar:?]
at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source) ~[xercesImpl-2.12.0.jar:2.12.0]
at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source) ~[xercesImpl-2.12.0.jar:2.12.0]
at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source) ~[xercesImpl-2.12.0.jar:2.12.0]
at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source) ~[xercesImpl-2.12.0.jar:2.12.0]
at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source) ~[xercesImpl-2.12.0.jar:2.12.0]
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) ~[xercesImpl-2.12.0.jar:2.12.0]
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) ~[xercesImpl-2.12.0.jar:?]
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) ~[xercesImpl-2.12.0.jar:?]
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) ~[xercesImpl-2.12.0.jar:?]
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) ~[xercesImpl-2.12.0.jar:?]
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) ~[xercesImpl-2.12.0.jar:?]
at net.sf.saxon.resource.ActiveSAXSource.deliver(ActiveSAXSource.java:190) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.event.Sender.send(Sender.java:105) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.jaxp.IdentityTransformer.transform(IdentityTransformer.java:364) ~[Saxon-EE-11.6.jar:?]
at com.css.csp.interfaces.transform.XSLTTransformer._transform(XSLTTransformer.java:836) ~[interfaces-transformer-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.transform.XSLTTransformer._transform(XSLTTransformer.java:867) ~[interfaces-transformer-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.transform.XSLTTransformer.transformCompiled(XSLTTransformer.java:680) ~[interfaces-transformer-24.3.0-RC4.jar:24.3.0-RC4]
... 94 more
Caused by: java.lang.NullPointerException: Cannot invoke "net.sf.saxon.om.Sequence.makeRepeatable()" because "value" is null
at net.sf.saxon.expr.XPathContextMinor.setLocalVariable(XPathContextMinor.java:374) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:747) ~[Saxon-EE-11.6.jar:?]
at com.saxonica.ee.bytecode.ByteCodeCandidate.processLeavingTail(ByteCodeCandidate.java:192) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:266) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:384) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:357) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:298) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:755) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:142) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:357) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:298) ~[Saxon-EE-11.6.jar:?]
at com.saxonica.ee.bytecode.ByteCodeCandidate.processLeavingTail(ByteCodeCandidate.java:192) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:266) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:384) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:357) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:298) ~[Saxon-EE-11.6.jar:?]
at com.saxonica.ee.bytecode.ByteCodeCandidate.processLeavingTail(ByteCodeCandidate.java:192) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:266) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:384) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.instruct.CallTemplate.processLeavingTail(CallTemplate.java:446) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:755) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:142) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:357) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:298) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:392) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:551) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.trans.XsltController.applyTemplates(XsltController.java:685) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.s9api.AbstractXsltTransformer.applyTemplatesToSource(AbstractXsltTransformer.java:422) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:359) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.jaxp.TransformerImpl.transform(TransformerImpl.java:75) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.jaxp.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:185) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.event.ContentHandlerProxy.close(ContentHandlerProxy.java:298) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.event.ProxyReceiver.close(ProxyReceiver.java:104) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.event.SequenceNormalizer.close(SequenceNormalizer.java:160) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.event.ReceivingContentHandler.endDocument(ReceivingContentHandler.java:269) ~[Saxon-EE-11.6.jar:?]
at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source) ~[xercesImpl-2.12.0.jar:?]
at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source) ~[xercesImpl-2.12.0.jar:2.12.0]
at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source) ~[xercesImpl-2.12.0.jar:2.12.0]
at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source) ~[xercesImpl-2.12.0.jar:2.12.0]
at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source) ~[xercesImpl-2.12.0.jar:2.12.0]
at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source) ~[xercesImpl-2.12.0.jar:2.12.0]
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) ~[xercesImpl-2.12.0.jar:2.12.0]
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) ~[xercesImpl-2.12.0.jar:?]
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) ~[xercesImpl-2.12.0.jar:?]
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) ~[xercesImpl-2.12.0.jar:?]
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) ~[xercesImpl-2.12.0.jar:?]
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) ~[xercesImpl-2.12.0.jar:?]
at net.sf.saxon.resource.ActiveSAXSource.deliver(ActiveSAXSource.java:190) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.event.Sender.send(Sender.java:105) ~[Saxon-EE-11.6.jar:?]
at net.sf.saxon.jaxp.IdentityTransformer.transform(IdentityTransformer.java:364) ~[Saxon-EE-11.6.jar:?]
at com.css.csp.interfaces.transform.XSLTTransformer._transform(XSLTTransformer.java:836) ~[interfaces-transformer-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.transform.XSLTTransformer._transform(XSLTTransformer.java:867) ~[interfaces-transformer-24.3.0-RC4.jar:24.3.0-RC4]
at com.css.csp.interfaces.transform.XSLTTransformer.transformCompiled(XSLTTransformer.java:680) ~[interfaces-transformer-24.3.0-RC4.jar:24.3.0-RC4]
... 94 more</p> Saxon - Support #6322 (New): Is the old collation URI in EE supposed to rely on the JDK collation...https://saxonica.plan.io/issues/63222024-01-17T16:12:22ZMartin Honnenmartin.honnen@gmx.de
<p>I notice differences in collation dependent sorts whether I use the UCA URI or the legacy Saxon URI.</p>
<p>The documentation at <a href="https://www.saxonica.com/html/documentation12/localization/sorting-and-collations.html" class="external">https://www.saxonica.com/html/documentation12/localization/sorting-and-collations.html</a> says about collations</p>
<blockquote>
<p>For backwards compatibility reasons the standard collation resolver in Saxon also accepts URIs in the form <a href="http://saxon.sf.net/collation" class="external">http://saxon.sf.net/collation</a> followed by query parameters; the query parameters that are recognized are the same as those defined by W3C UCA collation URIs.</p>
</blockquote>
<p>It appears to me, however, that with EE, the use of the legacy collation URI means ICU is not used, only the default JDK collation support, as I get results similar to using HE.</p>
<p>Can anyone confirm that?</p>
<p>Details below:</p>
<p>An XQuery program using the UCA collation URI, run with Saxon 12.4 EE, gives the same result for all sorts, e.g. the following program outputs true:</p>
<pre><code>declare namespace array = "http://www.w3.org/2005/xpath-functions/array";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare option output:method 'text';
declare option output:item-separator '&#10;';
declare variable $strings as array(xs:string*) external := [
('abc', 'abc def', 'abcdef'),
('abc', 'abcdef', 'abc def'),
('abc def', 'abcdef', 'abc'),
('abc def', 'abc', 'abcdef'),
('abcdef', 'abc', 'abc def'),
('abcdef', 'abc def', 'abc')
];
let $sorted :=
array:for-each(
$strings,
function($seq) {
sort($seq, 'http://www.w3.org/2013/collation/UCA?strength=primary;lang=en')
})
return
every $pos in (1 to array:size($sorted))
satisfies
deep-equal($sorted($pos), $strings?1)
</code></pre>
<p>The same program using the legacy Saxon collation URI, however, gives different sort result, much like Saxon HE, e.g. the program outputs false:</p>
<pre><code>declare namespace array = "http://www.w3.org/2005/xpath-functions/array";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare option output:method 'text';
declare option output:item-separator '&#10;';
declare variable $strings as array(xs:string*) external := [
('abc', 'abc def', 'abcdef'),
('abc', 'abcdef', 'abc def'),
('abc def', 'abcdef', 'abc'),
('abc def', 'abc', 'abcdef'),
('abcdef', 'abc', 'abc def'),
('abcdef', 'abc def', 'abc')
];
let $sorted :=
array:for-each(
$strings,
function($seq) {
sort($seq, 'http://saxon.sf.net/collation?strength=primary;lang=en')
})
return
every $pos in (1 to array:size($sorted))
satisfies
deep-equal($sorted($pos), $strings?1)
</code></pre> Saxon - Support #6254 (In Progress): The undeclaration of the default namespace xmlns="" on a chi...https://saxonica.plan.io/issues/62542023-11-16T16:07:02ZJohn Francis
<p>We have a sample file</p>
<pre><code class="xml syntaxhl" data-language="xml"><span class="cp"><?xml version="1.0" encoding="UTF-8"?></span>
<span class="nt"><article</span> <span class="na">xmlns=</span><span class="s">"http://docbook.org/ns/docbook"</span> <span class="na">version=</span><span class="s">"5.0"</span><span class="nt">></span>
<span class="nt"><info></span>
<span class="nt"><title></span>Additional Phrase Container Example<span class="nt"></title></span>
<span class="nt"></info></span>
<span class="nt"><sect1></span>
<span class="nt"><title></span>Additional Phrase Container Example<span class="nt"></title></span>
<span class="nt"><para></span>
<span class="nt"><extension1</span> <span class="na">xmlns=</span><span class="s">""</span><span class="nt">></span>Some text.<span class="nt"></extension1></span>
<span class="nt"></para></span>
<span class="nt"><para></span>
<span class="nt"><myns:extension2</span> <span class="na">xmlns:myns=</span><span class="s">"myns"</span><span class="nt">></span>Some text.<span class="nt"></myns:extension2></span>
<span class="nt"></para></span>
<span class="nt"><para></span>
<span class="nt"><extension3></span>Some text.<span class="nt"></extension3></span>
<span class="nt"></para></span>
<span class="nt"></sect1></span>
<span class="nt"></article></span>
</code></pre>
<p>Prior to Saxon 10 we got a call to <code>org.xml.sax.ContentHandler.startPrefixMapping(String, String)</code> with both arguments Set to "" corresponding to the <code>xmlns=""</code> default namespace un declaration at <code>/article/sect1[1]/para[1]/extension1[1]/@xmlns</code> . From Saxon 10 onwards we no longer get these events when we are using the Saxon API (as opposed to JAXP) and <code>net.sf.saxon.event.ContentHandlerProxy</code> . We do however get the correct arguments to <code>startElement(String, String, String, Attributes)</code> , "", "extension1", "extension1". However if all that our ContentHandler does is pass the events on to Saxon classes ( <code>net.sf.saxon.event.ReceivingContentHandler</code> ) that serializes the result into an XdmNode that XdmNode is invalid. If we then use it as the source for running a <code>net.sf.saxon.s9api.XsltTransformer</code> we get the following error even though it contains virtually not code;</p>
<pre><code>XTDE0440 Cannot output a namespace node for the default namespace
(http://docbook.org/ns/docbook) when the element is in no namespace
</code></pre>
<p><strong>What is the correct way now to call a <code>org.xml.sax.ContentHandler</code> using an XdmNode as a source and producing an XdmNode as a result if it contains <code>xmlns=""</code>?</strong></p>
<hr>
<p>I have included a zip of a standalone Maven project to reproduce the problem. There are 3 tests, <code>com.deltaxml.test.Tests.test1()</code> just does a JAXP version of the test which of course runs fine. <code>com.deltaxml.test.Tests.test2()</code> uses the Saxon APIs to do the same thing and throws the above error. <code>com.deltaxml.test.Tests.test3()</code> tweaks the test ContentHandler <code>com.deltaxml.test.SaxHandler</code> so that it detects when it has received a startElement event which is in a default namespace bound to the null prefix and simulates a prefix mapping. I would be grateful if you could see any problem with this 'workaround'.</p>
<p>FWIW I ran the tests in a debugger with SaxonHE and saw that <code>net.sf.saxon.tree.tiny.TinyTree</code> has a <code>net.sf.saxon.om.NamespaceBinding</code> from prefix "" to nsURI "" in <code>net.sf.saxon.tree.tiny.TinyTree.namespaceBinding</code> array. Whereas in Saxon 12 <code>net.sf.saxon.tree.tiny.TinyTree</code> does not have an entry for it in the<code>net.sf.saxon.tree.tiny.TinyTree.namespaceMaps</code> array. The code in Saxon 10+ seems to implement <code>xmlns=""</code> as the removal of a namespace, but ContentHandlerProxy doesn't do anything to be backward compatible. All of which would be fine for us except that when things are being passed through we end up getting a an XdmNode which cannot be used!</p>
<p>Thanks for your time</p> Saxon - Bug #6183 (In Progress): "fallback=no" on UCA collation not working in EE editionhttps://saxonica.plan.io/issues/61832023-08-23T01:29:51ZTrevor Lawrence
<p>We are using a licensed (as of 05/04/23) edition of SaxonJ-EE 11.5.</p>
<p>We're using the <code><xsl:sort></code> instruction within an <code><xsl:for-each-group></code> with a custom-defined UCA collation URI. While debugging an issue with it we decided to add the <code>fallback=no</code> parameter to see if we were misusing one of the options, and instead got a message saying it's not supported in Saxon-HE.</p>
<p>Attached to this issue is a minimal stylesheet that reproduces the issue. Invoking it with this command:</p>
<pre><code class="shell syntaxhl" data-language="shell">java <span class="nt">-cp</span> <path_to_xml_resolver_4.6.4>:<path_to_saxon_EE_11.5> <span class="se">\</span>
net.sf.saxon.Transform <span class="se">\</span>
<span class="nt">-xsl</span>:transform-with-EE-feature.xsl <span class="se">\</span>
<span class="nt">-o</span>:file.xml <span class="se">\</span>
<span class="nt">-it</span> <span class="se">\</span>
<span class="nt">-config</span>:<path_to_our_config_and_license>
</code></pre>
<p>gives:</p>
<pre><code>Error at xsl:sort on line 9 column 141 of transform-with-EE-feature.xsl:
XTDE1035 Failed to load collation
http://www.w3.org/2013/collation/UCA?lang=en;maxVariable=symbol;strength=4;alternate=shifted;fallback=no: Error in UCA Collation URI http://www.w3.org/2013/collation/UCA?lang=en;maxVariable=symbol;strength=4;alternate=shifted;fallback=no: fallback=no is not supported in Saxon-HE
Errors were reported during stylesheet compilation
</code></pre>
<p>We currently pull down Saxon-EE from your new Maven repo and XML Resolver from Maven central.</p> Saxon - Support #5980 (New): Should setting parser property affect XsltCompiler?https://saxonica.plan.io/issues/59802023-04-19T13:28:21ZMartin Honnenmartin.honnen@gmx.de
<p>Using Saxon 12.1 HE, the code</p>
<pre><code class="java syntaxhl" data-language="java"> <span class="nc">Processor</span> <span class="n">processor</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">Processor</span><span class="o">(</span><span class="kc">false</span><span class="o">);</span>
<span class="nc">Configuration</span> <span class="n">configuration</span> <span class="o">=</span> <span class="n">processor</span><span class="o">.</span><span class="na">getUnderlyingConfiguration</span><span class="o">();</span>
<span class="n">configuration</span><span class="o">.</span><span class="na">setParseOptions</span><span class="o">(</span><span class="n">configuration</span><span class="o">.</span><span class="na">getParseOptions</span><span class="o">().</span><span class="na">withParserProperty</span><span class="o">(</span><span class="s">"http://www.oracle.com/xml/jaxp/properties/"</span> <span class="o">+</span> <span class="s">"entityExpansionLimit"</span><span class="o">,</span> <span class="s">"128000"</span><span class="o">));</span>
<span class="nc">XsltCompiler</span> <span class="n">xsltCompiler</span> <span class="o">=</span> <span class="n">processor</span><span class="o">.</span><span class="na">newXsltCompiler</span><span class="o">();</span>
<span class="nc">XsltExecutable</span> <span class="n">xsltExecutable</span> <span class="o">=</span> <span class="n">xsltCompiler</span><span class="o">.</span><span class="na">compile</span><span class="o">(</span><span class="k">new</span> <span class="nc">File</span><span class="o">(</span><span class="s">"C:\\Users\\marti\\Downloads\\entity-expansion-size.xsl"</span><span class="o">));</span>
<span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">xsltExecutable</span><span class="o">);</span>
</code></pre>
<p>with the XSLT from <a href="https://saxonica.plan.io/attachments/64064" class="external">https://saxonica.plan.io/attachments/64064</a> gives an exception indicating that the parser property I have set is not taken into account by the parser XsltCompiler uses:</p>
<pre><code>Error on line 1 column 1
SXXP0003 Error reported by XML parser: JAXP00010001: Der Parser hat mehr als 64000
Entityerweiterungen in diesem Dokument gefunden. Dies ist der von JDK vorgeschriebene
Grenzwert.: JAXP00010001: Der Parser hat mehr als 64000 Entityerweiterungen in diesem
Dokument gefunden. Dies ist der von JDK vorgeschriebene Grenzwert.
Exception in thread "main" net.sf.saxon.s9api.SaxonApiException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; JAXP00010001: Der Parser hat mehr als 64000 Entityerweiterungen in diesem Dokument gefunden. Dies ist der von JDK vorgeschriebene Grenzwert.
at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:974)
at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:996)
at org.example.Main2.main(Main2.java:17)
Caused by: net.sf.saxon.trans.XPathException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; JAXP00010001: Der Parser hat mehr als 64000 Entityerweiterungen in diesem Dokument gefunden. Dies ist der von JDK vorgeschriebene Grenzwert.
at net.sf.saxon.resource.ActiveSAXSource.deliver(ActiveSAXSource.java:224)
at net.sf.saxon.resource.ActiveStreamSource.deliver(ActiveStreamSource.java:65)
at net.sf.saxon.event.Sender.send(Sender.java:104)
at net.sf.saxon.style.StylesheetModule.sendStylesheetSource(StylesheetModule.java:157)
at net.sf.saxon.style.StylesheetModule.loadStylesheet(StylesheetModule.java:231)
at net.sf.saxon.style.Compilation.compileSingletonPackage(Compilation.java:113)
at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:969)
... 2 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; JAXP00010001: Der Parser hat mehr als 64000 Entityerweiterungen in diesem Dokument gefunden. Dies ist der von JDK vorgeschriebene Grenzwert.
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:178)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1408)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1332)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(XMLDocumentFragmentScannerImpl.java:1844)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2985)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635)
at net.sf.saxon.resource.ActiveSAXSource.deliver(ActiveSAXSource.java:190)
... 8 more
</code></pre>
<p>When I change the code to use a DocumentBuilder e.g.</p>
<pre><code class="java syntaxhl" data-language="java"> <span class="nc">Processor</span> <span class="n">processor</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">Processor</span><span class="o">(</span><span class="kc">false</span><span class="o">);</span>
<span class="nc">Configuration</span> <span class="n">configuration</span> <span class="o">=</span> <span class="n">processor</span><span class="o">.</span><span class="na">getUnderlyingConfiguration</span><span class="o">();</span>
<span class="n">configuration</span><span class="o">.</span><span class="na">setParseOptions</span><span class="o">(</span><span class="n">configuration</span><span class="o">.</span><span class="na">getParseOptions</span><span class="o">().</span><span class="na">withParserProperty</span><span class="o">(</span><span class="s">"http://www.oracle.com/xml/jaxp/properties/"</span> <span class="o">+</span> <span class="s">"entityExpansionLimit"</span><span class="o">,</span> <span class="s">"128000"</span><span class="o">));</span>
<span class="nc">DocumentBuilder</span> <span class="n">docBuilder</span> <span class="o">=</span> <span class="n">processor</span><span class="o">.</span><span class="na">newDocumentBuilder</span><span class="o">();</span>
<span class="nc">XdmNode</span> <span class="n">doc</span> <span class="o">=</span> <span class="n">docBuilder</span><span class="o">.</span><span class="na">build</span><span class="o">(</span><span class="k">new</span> <span class="nc">File</span><span class="o">(</span><span class="s">"C:\\Users\\marti\\Downloads\\entity-expansion-size.xsl"</span><span class="o">));</span>
<span class="nc">XsltCompiler</span> <span class="n">xsltCompiler</span> <span class="o">=</span> <span class="n">processor</span><span class="o">.</span><span class="na">newXsltCompiler</span><span class="o">();</span>
<span class="nc">XsltExecutable</span> <span class="n">xsltExecutable</span> <span class="o">=</span> <span class="n">xsltCompiler</span><span class="o">.</span><span class="na">compile</span><span class="o">(</span><span class="n">doc</span><span class="o">.</span><span class="na">asSource</span><span class="o">());</span>
<span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">xsltExecutable</span><span class="o">);</span>
</code></pre>
<p>the code runs fine and the file is parsed and compiled fine, meaning the parser property is taken into account.</p>
<p>Shouldn't that also happen for the direct use of XsltCompiler.compile(file)?</p> Saxon - Bug #5877 (New): Java-CustomGUID generator is producing the same result when used inside ...https://saxonica.plan.io/issues/58772023-02-10T05:42:35ZThirupathi Molugoori
<p><strong>InputXml:</strong></p>
<pre><code><?xml version=\"1.0\"?>
<Guids>
<serialNum>1</serialNum>
</Guids>
<Guids>
<serialNum>2</serialNum>
</Guids>
</code></pre>
<p><strong>Case1:Using functions inside xslt</strong></p>
<pre><code><?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:func="http://www.xsltfunctions.com"
xmlns:helper="com.test.xslt.function" extension-element-prefixes="helper" version="2.0">
<xsl:template match="TestXML">
<xsl:element name="TestElement">
<xsl:for-each select="./Guids">
<xsl:element name="serialNum">
<xsl:value-of select="serialNum"/>
</xsl:element>
<xsl:element name="TestGuid">
<xsl:value-of select="func:genGuid()"/>
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:template>
<xsl:function name="func:genGuid">
<xsl:value-of select="helper:genGUID()"/>
</xsl:function>
</xsl:stylesheet>
**Output **
<?xml version="1.0" encoding="UTF-8"?>
<TestElement>
<serialNum>1</serialNum>
<TestGuid>D5CAF5D4-8C05-408A-B56A-A277A8F33975</TestGuid>
<serialNum>2</serialNum>
<TestGuid>D5CAF5D4-8C05-408A-B56A-A277A8F33975</TestGuid>
</TestElement>
</code></pre>
<p><strong>Case2:If I use the custom function directly inside the for-each(instead of template/function) then also it is producing the same guid as above which is not expected.</strong></p>
<p><strong>Case3:Using template inside Xslt is producing the correct result</strong></p>
<pre><code><?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:helper="com.test.xslt.function" extension-element-prefixes="helper" version="2.0">
<xsl:template match="TestXML">
<xsl:element name="TestElement">
<xsl:for-each select="./Guids">
<xsl:element name="serialNum">
<xsl:value-of select="serialNum"/>
</xsl:element>
<xsl:element name="TestGuid">
<xsl:call-template name="genGUID"/>
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:template>
<xsl:template name="genGUID">
<xsl:value-of select="helper:genGUID()"/>
</xsl:template>
</xsl:stylesheet>
</code></pre>
<p><strong>Output:</strong></p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<TestElement>
<serialNum>1</serialNum>
<TestGuid>E75AE452-4B7F-4CF8-A6CE-64DE81687384</TestGuid>
<serialNum>2</serialNum>
<TestGuid>771D2C44-8216-4CA7-B43A-2CBEB03AF7F3</TestGuid>
</TestElement>
</code></pre>
<p><strong>Customer function implementation:</strong></p>
<pre><code>package com.test.xslt.function;
import java.util.UUID;
import net.sf.saxon.s9api.ExtensionFunction;
import net.sf.saxon.s9api.QName;
import net.sf.saxon.s9api.SaxonApiException;
import net.sf.saxon.s9api.SequenceType;
import net.sf.saxon.s9api.XdmAtomicValue;
import net.sf.saxon.s9api.XdmValue;
public class GUIDGenFunction implements ExtensionFunction {
@Override
public QName getName() {
return new QName( "com.test.xslt.function", "genGUID" );
}
@Override
public SequenceType[] getArgumentTypes() {
return new SequenceType[]{};
}
@Override
public SequenceType getResultType() {
return SequenceType.ANY;
}
@Override
public XdmValue call( XdmValue[] arguments ) throws SaxonApiException {
String result = UUID.randomUUID().toString().toUpperCase();
System.out.println( "GUID Result " + result );
return new XdmAtomicValue( result );
}
}
ExtensionFunction genGUIDFunction = new GUIDGenFunction();
processor.registerExtensionFunction( genGUIDFunction );
</code></pre>
<p>Please let me know why it is not working as expected in case1&2.</p> Saxon - Feature #5709 (New): Compiler and target processor information from fn:system-property()https://saxonica.plan.io/issues/57092022-10-04T08:05:03ZDebbie Lockettdebbie@saxonica.com
<p>Add more (saxon namespace) properties to return compile-time infomation about the target processor and compiler using <code>fn:system-property()</code>. Currently we have <code>xsl:product-name</code> and <code>xsl:product-version</code>: when XJ-compiling for JS, evaluated statically these return for instance <code>"SAXON"</code> and <code>"JS 11.4"</code>. Note that the <code>xsl:product-version</code> value is made up of the target edition and compiler version number; but we don't get the compiler edition (EE). The property <code>saxon:platform</code> can also be used (with SaxonJS) to get run-time information about the platform ("Node.js" or "Browser").</p>
<p>(As originally suggested in SaxonJS <a class="issue tracker-1 status-3 priority-2 priority-default closed" title="Status: Closed" href="https://saxonica.plan.io/issues/5698">Bug #5698: Changes for system-property()</a>.)</p> Saxon - Bug #5615 (New): Saxon 11 - Cannot have two different documents with the same document-urihttps://saxonica.plan.io/issues/56152022-07-26T11:03:55ZRadu Coravuradu_coravu@sync.ro
<p>I'm getting this unhandled error which comes probably from reusing a transformer, the code we use is quite complex in those parts:</p>
<pre><code>7065 ERROR [ main ] ro.sync.quickfix.QuickFixExecutor - Cannot generate late quick fixes: net.sf.saxon.trans.XPathException: Cannot have two different documents with the same document-uri file:/D:/projects/../SchematronQF/add/element/selectAttrValue/topic.dita
net.sf.saxon.trans.XPathException: Cannot have two different documents with the same document-uri file:/D:/projects/../SchematronQF/add/element/selectAttrValue/topic.dita
at net.sf.saxon.om.DocumentPool.add(DocumentPool.java:69)
at net.sf.saxon.Controller.registerDocument(Controller.java:1004)
at net.sf.saxon.Controller.makeSourceTree(Controller.java:1359)
at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:343)
at net.sf.saxon.jaxp.TransformerImpl.transform(TransformerImpl.java:75)
</code></pre>
<p>would it be a good idea in the Controller.registerDocument to check if the document is already in the pool before adding it?</p>
<pre><code> if (getDocumentPool().find(uri) == null) {
sourceDocumentPool.add(doc, uri);
}
</code></pre> Saxon - Bug #5578 (New): Feature: tracing on .NEThttps://saxonica.plan.io/issues/55782022-06-23T08:38:47ZMichael Kaymike@saxonica.com
<p>See <a href="https://saxonica.plan.io/boards/3/topics/8829" class="external">https://saxonica.plan.io/boards/3/topics/8829</a></p>
<p>The basic tracing infrastructure is present in SaxonCS (the -T option on the command line works), but the APIs to control it are largely missing, and the -TP option (with the underlying TimingTraceListener class) is absent.</p>
<p>The restrictions are not well documented, for example the page "Using XSLT from the command line" does not mark the -TP option as Java-only.</p> Saxon - Bug #4664 (In Progress): Xerces bug: Wrong value of xml:base attribute after resolving XI...https://saxonica.plan.io/issues/46642020-08-03T10:48:44ZO'Neil Delprattoneil@saxonica.com
<p>The following Xerces bug is affecting several users: <a href="https://issues.apache.org/jira/browse/XERCESJ-1102" class="external">https://issues.apache.org/jira/browse/XERCESJ-1102</a></p>
<p>This bug causes the wrong value of xml:base attribute after resolving XInclude references. One user applies a the patch in a jar file that is included on the Java classpath when Saxon is invoked. It would be good to apply this patch internally with Saxon as part of the issued product.</p>
<p>This affects: Saxon-J, Saxon.NET and Saxon/C</p> Non-Conformances - Bug #4220 (New): Exposed visibility of xsl:paramhttps://saxonica.plan.io/issues/42202019-05-15T10:39:14ZMichael Kaymike@saxonica.com
<p>Unit test <code>s9apitests/TestPackage/testPackageRenamingExported</code> is failing with an error saying it cannot accept xsl:param elements with private visibility as hidden.</p>
<p>The spec says (a) that xsl:param elements are always public, and (b) that their visibility cannot be changed by <code>xsl:expose</code> or <code>xsl:accept</code>.</p>
<p>What this test is trying to do is to compile a single package three times with different settings of a static parameter, and then import all three exported packages into a single top-level package (using package aliases to achieve this). It might be that we won't be able to get this to work, but we need to investigate why it's failing the way that it is. The spec says that xsl:param is public, but we're reporting it as private.</p> Non-Conformances - Bug #3531 (New): Substitution groups are not mergedhttps://saxonica.plan.io/issues/35312017-11-16T07:07:38ZMichael Kaymike@saxonica.com
<p>Taking this over as a sub-problem of bug <a class="issue tracker-1 status-3 priority-2 priority-default closed" title="Bug: --multipleSchemaImports has no effect when processing a cycle of schema documents (Closed)" href="https://saxonica.plan.io/issues/3202">#3202</a>.</p>
<p>MHK IntelliJ project Saxon9.8/XBRLTest</p>
<p>When there are several independent calls on SchemaManager.load(), each call on load() results in a new PreparedSchema being built; and if the schema is then found to be valid, its components are merged into the global schema for the Configuration. (We carefully avoid making any changes to the global schema until the new local schema has been verified as being valid.)</p>
<p>If two of these calls on load() specify two different schemas which both import some common schema, it's possible that either or both may declare elements to be in the substitution group of some element declaration in the common schema. When this happens then the process of merging the local schema into the global schema should form the union of the two substitution groups (and in turn, this should trigger recompilation of any affected types). This is not happening: we use one element declaration or the other, but we never merge them in this way.</p>
<p>The logic is complicated by xs:redefine, but let's focus on getting it right in the absence of xs:redefine.</p>