Saxonica Developer Community: Issueshttps://saxonica.plan.io/https://saxonica.plan.io/favicon.ico2024-03-22T14:42:37ZSaxonica Developer Community
Planio 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> SaxonC - Bug #6372 (In Progress): Unable to parse Windows-1252 encoded XML files on Linuxhttps://saxonica.plan.io/issues/63722024-03-15T13:57:04ZMatt Patterson
<p>From the forum (<a href="https://saxonica.plan.io/boards/4/topics/9617" class="external">https://saxonica.plan.io/boards/4/topics/9617</a>):</p>
<blockquote>
<p>working with version 12.4.2 on Linux and having this simplified C++ code to explain what I do:</p>
<pre><code class="cpp syntaxhl" data-language="cpp"> <span class="n">SaxonProcessor</span> <span class="o">*</span><span class="n">processor</span> <span class="o">=</span> <span class="k">new</span> <span class="nf">SaxonProcessor</span><span class="p">(</span><span class="nb">true</span><span class="p">);</span>
<span class="n">Xslt30Processor</span> <span class="o">*</span><span class="n">trans</span> <span class="o">=</span> <span class="n">processor</span><span class="o">-></span><span class="n">newXslt30Processor</span><span class="p">();</span>
<span class="n">XsltExecutable</span> <span class="o">*</span><span class="n">executable</span> <span class="o">=</span> <span class="n">executable</span> <span class="o">=</span> <span class="n">trans</span><span class="o">-></span><span class="n">compileFromFile</span><span class="p">(</span><span class="s">"/tmp/test.xsl"</span><span class="p">);</span>
<span class="n">executable</span><span class="o">-></span><span class="n">setInitialMatchSelectionAsFile</span><span class="p">(</span><span class="s">"/tmp/file.xml"</span><span class="p">);</span>
<span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">output</span> <span class="o">=</span> <span class="n">executable</span><span class="o">-></span><span class="n">applyTemplatesReturningString</span><span class="p">();</span>
</code></pre>
<p>My file.xml header is like this:</p>
<pre><code class="xml syntaxhl" data-language="xml"><span class="cp"><?xml version="1.0" encoding="windows-1252" standalone="no"?></span>
</code></pre>
<p>I get the following exception running my program:</p>
<pre><code class="cpp syntaxhl" data-language="cpp"> <span class="n">SXXP0003</span> <span class="n">I</span><span class="o">/</span><span class="n">O</span> <span class="n">error</span> <span class="n">reported</span> <span class="n">by</span> <span class="n">XML</span> <span class="n">parser</span> <span class="n">processing</span>
<span class="n">file</span><span class="o">:</span><span class="c1">///tmp/file1.xml. Caused by</span>
<span class="n">java</span><span class="p">.</span><span class="n">io</span><span class="p">.</span><span class="n">UnsupportedEncodingException</span><span class="o">:</span> <span class="n">Cp1252</span>
</code></pre>
<p>My Linux its locale is en_US.UTF-8. Using XML files with utf-8 or iso-8859-1 encodings all work fine.</p>
<p>The same program and input files with windows-1252 encoding on Windows work though. I face this problem only on Linux.</p>
</blockquote> 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> SaxonC - Bug #6351 (In Progress): Getting the line number is not available via the API on XdmNodehttps://saxonica.plan.io/issues/63512024-02-17T11:32:24ZO'Neil Delprattoneil@saxonica.com
<p>Reported by user here: <a href="https://stackoverflow.com/questions/78008394/how-do-i-get-the-line-numbers-of-a-saxonc-xpath-match/78009287#78009287" class="external">https://stackoverflow.com/questions/78008394/how-do-i-get-the-line-numbers-of-a-saxonc-xpath-match/78009287#78009287</a></p>
<p>There is no straight forward way to get the line number on a XdmNode in C++, PHP and Python.</p>
<p>For example, the Python PyXdmNode (see: <a href="https://www.saxonica.com/saxon-c/doc12/html/saxonc.html#PyXdmNode" class="external">https://www.saxonica.com/saxon-c/doc12/html/saxonc.html#PyXdmNode</a>) currently does not support getting line numbers as its Java equivalent class XdmNode: <a href="https://www.saxonica.com/html/documentation12/javadoc/net/sf/saxon/s9api/XdmNode.html#getLineNumber()" class="external">https://www.saxonica.com/html/documentation12/javadoc/net/sf/saxon/s9api/XdmNode.html#getLineNumber()</a></p> SaxonC - Bug #6333 (In Progress): Representing empty sequencehttps://saxonica.plan.io/issues/63332024-01-29T17:52:37ZO'Neil Delprattoneil@saxonica.com
<p>SaxonC currently does not properly represent empty sequences via the API. What we need is an <code>XdmEmptySequence</code> class similar to its Java counterpart. Moreover, In SaxonJ (Java) an empty <code>XdmValue</code> is also an empty sequence which can be passed as a parameter to an expression of stylesheet, but this fails in SaxonC.</p>
<p>For example:</p>
<pre><code class="python syntaxhl" data-language="python"> <span class="n">xp</span> <span class="o">=</span> <span class="n">saxonproc</span><span class="p">.</span><span class="n">new_xpath_processor</span><span class="p">()</span>
<span class="n">xp</span><span class="p">.</span><span class="n">declare_namespace</span><span class="p">(</span><span class="s">"fn"</span><span class="p">,</span> <span class="s">"http://www.w3.org/2005/xpath-functions"</span><span class="p">)</span>
<span class="n">xp</span><span class="p">.</span><span class="n">declare_variable</span><span class="p">(</span><span class="s">'p'</span><span class="p">)</span>
<span class="n">xdm_value</span> <span class="o">=</span> <span class="n">PyXdmValue</span><span class="p">()</span>
<span class="n">xp</span><span class="p">.</span><span class="n">set_parameter</span><span class="p">(</span><span class="s">'p'</span><span class="p">,</span> <span class="n">xdm_value</span><span class="p">)</span>
<span class="k">assert</span> <span class="n">xp</span><span class="p">.</span><span class="n">effective_boolean_value</span><span class="p">(</span><span class="s">"fn:empty($p)"</span><span class="p">)</span>
</code></pre>
<p>Crashes out with the following exception:</p>
<pre><code>java.lang.IllegalArgumentException: Invalid handle
at com.oracle.svm.core.handles.ObjectHandlesImpl.doGet(ObjectHandlesImpl.java:232)
at com.oracle.svm.core.handles.ObjectHandlesImpl.get(ObjectHandlesImpl.java:220)
at net.sf.saxon.option.cpp.ProcessorDataAccumulator.addProcessorDataPair(ProcessorDataAccumulator.java:93)
</code></pre>
<p>This is probably because the empty <code>PyXdmValue()</code> object is not internally getting converted to an empty sequence.</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> SaxonC - Bug #6317 (In Progress): The cwd is limited to 256 charactershttps://saxonica.plan.io/issues/63172024-01-12T13:05:40ZNorm Tovey-Walsh
<ol>
<li>What lengths should we use for the various platforms?</li>
<li>Where is this documented?</li>
</ol> 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> SaxonC - Feature #6074 (AwaitingInfo): Enhance the C API with separate XSLT compile and execute ...https://saxonica.plan.io/issues/60742023-06-12T13:29:13ZO'Neil Delprattoneil@saxonica.com
<p>User request to enhance the C API with separate XSLT compile and execute functions.</p> SaxonJS - Bug #6069 (AwaitingInfo): "Unexpected XSLT error" "Cannot add item to tree: (object)"https://saxonica.plan.io/issues/60692023-06-09T05:31:07ZConal Tuohy
<p>I've encountered a strange error running a compiled stylesheet under SaxonJS 2.5 in NodeJS v18.16.0. The stylesheet is compiled on the same platform with the <code>xslt3</code> utility.</p>
<p>This all used to work at some point in the past and I'm not sure what has changed, but I have managed to cut the stylesheet down to a fairly minimal example that reproduces the problem.</p>
<p>My JS code invokes the stylesheet using <code>SaxonJS.transform</code>, and passes parameters to it using <code>stylesheetParams</code>. One of the parameters (<code>$source-uri</code>) is an absolute <code>file:</code> which the stylesheet passes to the <code>doc</code> function, and then applies templates to the result.</p>
<p>The stylesheet implements a pipeline of several transformations by applying templates to a document, capturing the result as a variable, then applying templates to the variable, capturing the result as another variable, applying templates to that, etc. Without that pipeline the stylesheet works OK (i.e. if in the stylesheet below I replace <code><xsl:copy-of select="$phase-1"/></code> with <code><xsl:copy-of select="$source"/></code>, then I get the result I expect; a copy of the source document).</p>
<pre><code class="xml syntaxhl" data-language="xml"><span class="nt"><xsl:transform</span> <span class="na">version=</span><span class="s">"3.0"</span> <span class="na">xmlns:xsl=</span><span class="s">"http://www.w3.org/1999/XSL/Transform"</span><span class="nt">></span>
<span class="c"><!--
Test of weird SaxonJS regression
--></span>
<span class="nt"><xsl:param</span> <span class="na">name=</span><span class="s">"source-uri"</span><span class="nt">/></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="c"><!-- read the document --></span>
<span class="nt"><xsl:variable</span> <span class="na">name=</span><span class="s">"source"</span> <span class="na">select=</span><span class="s">"doc($source-uri)"</span><span class="nt">/></span>
<span class="c"><!-- transform the document with an identity mode --></span>
<span class="nt"><xsl:variable</span> <span class="na">name=</span><span class="s">"phase-1"</span><span class="nt">></span>
<span class="nt"><xsl:apply-templates</span> <span class="na">mode=</span><span class="s">"identity"</span> <span class="na">select=</span><span class="s">"$source"</span><span class="nt">/></span>
<span class="nt"></xsl:variable></span>
<span class="c"><!-- write the document --></span>
<span class="nt"><xsl:result-document</span> <span class="na">href=</span><span class="s">"/tmp/regression-test-output.xml"</span> <span class="na">method=</span><span class="s">"xml"</span> <span class="na">indent=</span><span class="s">"no"</span><span class="nt">></span>
<span class="nt"><xsl:copy-of</span> <span class="na">select=</span><span class="s">"$phase-1"</span><span class="nt">/></span>
<span class="nt"></xsl:result-document></span>
<span class="nt"></xsl:template></span>
<span class="nt"><xsl:mode</span> <span class="na">name=</span><span class="s">"identity"</span> <span class="na">on-no-match=</span><span class="s">"shallow-copy"</span><span class="nt">/></span>
<span class="nt"></xsl:transform></span>
</code></pre>
<p>Here's the JS API call I use to invoke the stylesheet (my minimal example uses only the <code>source-uri</code> parameter, but the real stylesheet needs those other two):</p>
<pre><code class="javascript syntaxhl" data-language="javascript"><span class="kd">const</span> <span class="nx">transformationResults</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">SaxonJS</span><span class="p">.</span><span class="nx">transform</span><span class="p">(</span>
<span class="p">{</span>
<span class="na">stylesheetFileName</span><span class="p">:</span> <span class="dl">"</span><span class="s2">/srv/tasks/src/xslt/document-function-regression-test.xsl.sef.json</span><span class="dl">"</span><span class="p">,</span>
<span class="c1">//stylesheetFileName: "/srv/tasks/src/xslt/process-tei-to-page-files.xsl.sef.json",</span>
<span class="na">stylesheetParams</span><span class="p">:</span> <span class="p">{</span>
<span class="na">identifier</span><span class="p">:</span> <span class="nx">identifier</span><span class="p">,</span>
<span class="dl">"</span><span class="s2">source-uri</span><span class="dl">"</span><span class="p">:</span> <span class="nx">sourceURI</span><span class="p">,</span>
<span class="dl">"</span><span class="s2">page-identifier-regex</span><span class="dl">"</span><span class="p">:</span> <span class="nx">configuration</span><span class="p">.</span><span class="nx">ui</span><span class="p">.</span><span class="nx">filename</span><span class="p">.</span><span class="nx">checkNameStructure</span><span class="p">,</span>
<span class="p">},</span>
<span class="na">baseOutputURI</span><span class="p">:</span> <span class="nx">output</span> <span class="p">?</span> <span class="nx">output</span> <span class="p">:</span> <span class="nx">sourceURI</span><span class="p">,</span> <span class="c1">// output into the same folder as the source data file</span>
<span class="p">},</span>
<span class="dl">"</span><span class="s2">async</span><span class="dl">"</span>
<span class="p">);</span>
</code></pre>
<p>Logging the error thrown by SaxonJS.transform produces:</p>
<pre><code> console.error
L {
message: 'An unexpected error occurred in XSLT code. Please report the following information: \n' +
'Error SXJS0004 in document-function-regression-test.xsl line 11:\n' +
'Internal error: Cannot add item to tree (object) <TEI xmlns="http://www.tei-c.org/ns/1.0">\n' +
' <teiHeader>\n' +
' <fileDesc>\n' +
' <titleStmt>\n' +
' <title/>\n' +
' <author/>\n' +
' </titleStmt>\n' +
' <editionStmt>\n' +
' <edition>\n' +
' <date>2022-04-04</date>\n' +
' </edition>\n' +
' </editionStmt>\n' +
' <publicationStmt>\n' +
' <p>unknown</p>\n' +
' </publicationStmt>\n' +
' <sourceDesc>\n' +
' <p>Converted from a Word document</p>\n' +
' </sourceDesc>\n' +
' </fileDesc>\n' +
' <encodingDesc>\n' +
' <appInfo>\n' +
' <application xml:id="docxtotei" ident="TEI_fromDOCX" version="2.15.0">\n' +
' <label>DOCX to TEI</label>\n' +
' </application>\n' +
' </appInfo>\n' +
' </encodingDesc>\n' +
' <revisionDesc>\n' +
' <listChange>\n' +
' <change>\n' +
' <date>2022-04-13T04:31:35Z</date>\n' +
' <name/>\n' +
' </change>\n' +
' </listChange>\n' +
' </revisionDesc>\n' +
' </teiHeader>\n' +
' <text>\n' +
' <body>\n' +
' <p rend="Normal" style="text-align: left; ">\n' +
' <hi rend="Page">msword_example-001</hi> Text of page 1</p>\n' +
' <p rend="Normal" style="text-align: left; ">\n' +
' <pb/>\n' +
' </p>\n' +
' <p rend="Normal" style="text-align: left; ">\n' +
' <hi rend="Page">msword_example-002</hi> Text of page 2 starts here</p>\n' +
' <p rend="Normal" style="text-align: left; ">More page 2 text.<pb/>\n' +
' </p>\n' +
' <p rend="Normal" style="text-align: left; ">\n' +
' <hi rend="Page">msword_example-003</hi> Finally this we have this, the transcription of page 3; the third page of the document, i.e. the page which follows immediately after the second page, also known as “page 2”.</p>\n' +
' <p rend="Normal" style="text-align: left; ">This is more of the third page.<pb/>\n' +
' </p>\n' +
' <p rend="Normal" style="text-align: left; ">\n' +
' <hi rend="Page">msword_example_2-001</hi> This is the first page of transcript of a different item; an item called msword_example_2; this page should not be extracted from the file.</p>\n' +
' </body>\n' +
' </text>\n' +
'</TEI>',
stack: 'Error: \n' +
' at new L (/srv/tasks/node_modules/saxon-js/SaxonJS2N.js:4109:549)\n' +
' at Object.a [as ga] (/srv/tasks/node_modules/saxon-js/SaxonJS2N.js:4110:349)\n' +
' at a.append (/srv/tasks/node_modules/saxon-js/SaxonJS2N.js:4372:52)\n' +
' at Object.q [as gh] (/srv/tasks/node_modules/saxon-js/SaxonJS2N.js:4362:243)\n' +
' at SC (/srv/tasks/node_modules/saxon-js/SaxonJS2N.js:4971:310)\n' +
' at e.hf (/srv/tasks/node_modules/saxon-js/SaxonJS2N.js:4976:85)\n' +
' at /srv/tasks/node_modules/saxon-js/SaxonJS2N.js:4973:289\n' +
' at wc.Object.<anonymous>.ca.forEachItem (/srv/tasks/node_modules/saxon-js/SaxonJS2N.js:4206:583)\n' +
' at e.Bb (/srv/tasks/node_modules/saxon-js/SaxonJS2N.js:4973:256)\n' +
' at /srv/tasks/node_modules/saxon-js/SaxonJS2N.js:4376:8\n' +
' at /srv/tasks/node_modules/saxon-js/SaxonJS2N.js:4358:33\n' +
' at Array.forEach (<anonymous>)\n' +
' at /srv/tasks/node_modules/saxon-js/SaxonJS2N.js:4358:6\n' +
' at /srv/tasks/node_modules/saxon-js/SaxonJS2N.js:4379:17\n' +
' at Object.push (/srv/tasks/node_modules/saxon-js/SaxonJS2N.js:4390:143)\n' +
' at /srv/tasks/node_modules/saxon-js/SaxonJS2N.js:4600:290\n' +
' at /srv/tasks/node_modules/saxon-js/SaxonJS2N.js:4386:258\n' +
' at /srv/tasks/node_modules/saxon-js/SaxonJS2N.js:4386:309\n' +
' at Object.push (/srv/tasks/node_modules/saxon-js/SaxonJS2N.js:4390:143)\n' +
' at e (/srv/tasks/node_modules/saxon-js/SaxonJS2N.js:4988:69)\n' +
' at /srv/tasks/node_modules/saxon-js/SaxonJS2N.js:5015:342',
name: 'UnexpectedXSLTError',
code: 'SXJS0004',
xsltLineNr: '11',
xsltModule: 'document-function-regression-test.xsl'
}
</code></pre>
<p>The TEI XML content in that error message is indeed the content of the file identified by the <code>$source-uri</code> parameter.</p>
<p>The stylesheet succeeds when launched from the command line:</p>
<pre><code>node /srv/tasks/node_modules/xslt3 -it -t -xsl:/srv/tasks/src/xslt/document-function-regression-test.xsl source-uri=file:///srv/tasks/src/test-data/Succeeds-word_doc_upload/fake-msword-example/msword_example-tei.xml
SaxonJS 2.5 from Saxonica
Node.js version v18.16.0
Compiling stylesheet /srv/tasks/src/xslt/document-function-regression-test.xsl
Stylesheet compilation time: 0.284s
Initial template: Q{http://www.w3.org/1999/XSL/Transform}initial-template
Asynchronous transform with options: stylesheetText={"N":"package","version":"30",(string), stylesheetBaseURI=file:///srv/tasks/src/xslt/doc(string), stylesheetParams=[object Object](string), outputProperties=[object Object](string), extraOptions=[object Object](string), destination=stdout(string), baseOutputURI=file:///srv/tasks/(string), logLevel=2(string), initialTemplate=Q{http://www.w3.org/1999/XSL/T(string),
SEF generated by SaxonJS 2.5 at 2023-06-09T05:22:48.208Z
Promising to write to file:///tmp/regression-test-output.xml
<?xml version="1.0" encoding="UTF-8"?>
Execution time: 0.147s
Memory used: 29.21Mb
Transformation complete
</code></pre>
<p>The output file <code>ile:///tmp/regression-test-output.xml</code> is there and is a copy of the input file <code>file:///srv/tasks/src/test-data/Succeeds-word_doc_upload/fake-msword-example/msword_example-tei.xml</code></p>
<p>Naturally I can also run the stylesheet successfully under SaxonJ.</p> Saxon - Bug #6042 (AwaitingInfo): Xerces occasionally throws ArrayIndexOutOfBoundsExceptionhttps://saxonica.plan.io/issues/60422023-05-21T17:29:54ZNorm Tovey-Walsh
<p>Can't reproduce this locally and debugging through the narrow opening provided by CI is awfully painful, but FYI:</p>
<p>This is <code>xspec.bat</code> (slightly hacked) from the DocBook xslTNG project running on Windows CI in GitHub. I've instrumented the batch file with:</p>
<pre><code> echo "XSLT:"
echo %*
</code></pre>
<p>The full command is:</p>
<pre><code> java ^
-Dfile.encoding=UTF-8 ^
-Dxspec.coverage.ignore="%TEST_DIR%" ^
-Dxspec.coverage.xml="%COVERAGE_XML%" ^
-Dxspec.home="%XSPEC_HOME%" ^
-Dxspec.xspecfile="%XSPEC%" ^
-Dorg.docbook.xsltng.extensions.pygmentize="%PYGMENTIZE%" ^
-Dorg.docbook.xsltng.verbose="%VERBOSE%" ^
-cp "%CP%" net.sf.saxon.Transform %CATALOG% ^
-init:org.docbook.xsltng.extensions.Register %*
</code></pre>
<p>With Saxon 11.5:</p>
<pre><code>Formatting Report...
"XSLT:"
-o:"D:\a\xslTNG\xslTNG\build\default-result.html" -s:"D:\a\xslTNG\xslTNG\build\default-result.xml" -xsl:"D:\a\xslTNG\xslTNG\build\xspec-2.2.4\bin\..\src\reporter\format-xspec-report.xsl" inline-css=true
java.lang.IllegalStateException: java.lang.ArrayIndexOutOfBoundsException: 2048
at net.sf.saxon.resource.ActiveSAXSource.deliver(ActiveSAXSource.java:233)
at net.sf.saxon.resource.ActiveStreamSource.deliver(ActiveStreamSource.java:65)
at net.sf.saxon.event.Sender.send(Sender.java:105)
at net.sf.saxon.Configuration.buildDocumentTree(Configuration.java:4138)
at net.sf.saxon.s9api.DocumentBuilder.build(DocumentBuilder.java:334)
at net.sf.saxon.Transform.processFile(Transform.java:1346)
at net.sf.saxon.Transform.doTransform(Transform.java:871)
at net.sf.saxon.Transform.main(Transform.java:81)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 2048
at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.scanContent(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at net.sf.saxon.resource.ActiveSAXSource.deliver(ActiveSAXSource.java:190)
... 7 more
Fatal error during transformation: java.lang.IllegalStateException: java.lang.ArrayIndexOutOfBoundsException: 2048
*** Error formatting the report
</code></pre>
<p>with Saxon 12.2:</p>
<pre><code>Formatting Report...
"XSLT:"
-o:"D:\a\xslTNG\xslTNG\build\default-result.html" -s:"D:\a\xslTNG\xslTNG\build\default-result.xml" -xsl:"D:\a\xslTNG\xslTNG\build\xspec-2.2.4\bin\..\src\reporter\format-xspec-report.xsl" inline-css=true
java.lang.ArrayIndexOutOfBoundsException: 2048
at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.scanContent(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at net.sf.saxon.resource.ActiveSAXSource.deliver(ActiveSAXSource.java:190)
at net.sf.saxon.resource.ActiveStreamSource.deliver(ActiveStreamSource.java:65)
at net.sf.saxon.event.Sender.send(Sender.java:104)
at net.sf.saxon.Configuration.buildDocumentTree(Configuration.java:4210)
at net.sf.saxon.s9api.DocumentBuilder.build(DocumentBuilder.java:334)
at net.sf.saxon.Transform.processFile(Transform.java:1345)
at net.sf.saxon.Transform.doTransform(Transform.java:879)
at net.sf.saxon.Transform.main(Transform.java:83)
Fatal error during transformation: java.lang.ArrayIndexOutOfBoundsException: 2048
*** Error formatting the report
</code></pre>
<p>It's particularly annoying that this looks like an encoding issue but I have explicitly specified the <code>file.encoding</code> and the same code on my local Windows machine does not fail.</p> SaxonC - Bug #5943 (AwaitingInfo): XSLT through SaxonC PHP gives "Segmentation fault"https://saxonica.plan.io/issues/59432023-03-28T14:12:39ZYouri Lefers
<p>Hi all,</p>
<p>We've upgraded our SaxonC PHP library to Saxon 12(.1), but it gives a segmentation fault (error code 139 with PHPUnit) when it runs 2 or more transformations after each other. This happens in version 12.1, but also happened in version 12. We use PHP 8.1 (FPM).</p>
<p>We use a factory to construct and destruct a <code>SaxonProcessor</code> instance:</p>
<pre><code class="php syntaxhl" data-language="php"><span class="kn">use</span> <span class="nc">Saxon\SaxonProcessor</span><span class="p">;</span>
<span class="kd">class</span> <span class="nc">SaxonProcessorFactory</span>
<span class="p">{</span>
<span class="k">private</span> <span class="kt">?SaxonProcessor</span> <span class="nv">$saxonProcessor</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>
<span class="k">public</span> <span class="k">function</span> <span class="n">__destruct</span><span class="p">()</span>
<span class="p">{</span>
<span class="k">if</span> <span class="p">(</span><span class="kc">null</span> <span class="o">!==</span> <span class="nv">$this</span><span class="o">-></span><span class="n">saxonProcessor</span><span class="p">)</span> <span class="p">{</span>
<span class="nv">$this</span><span class="o">-></span><span class="n">saxonProcessor</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="k">public</span> <span class="k">function</span> <span class="n">get</span><span class="p">():</span> <span class="kt">SaxonProcessor</span>
<span class="p">{</span>
<span class="k">if</span> <span class="p">(</span><span class="kc">null</span> <span class="o">===</span> <span class="nv">$this</span><span class="o">-></span><span class="n">saxonProcessor</span><span class="p">)</span> <span class="p">{</span>
<span class="nv">$this</span><span class="o">-></span><span class="n">saxonProcessor</span> <span class="o">=</span> <span class="nv">$this</span><span class="o">-></span><span class="nf">create</span><span class="p">();</span>
<span class="p">}</span>
<span class="k">return</span> <span class="nv">$this</span><span class="o">-></span><span class="n">saxonProcessor</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">private</span> <span class="k">function</span> <span class="n">create</span><span class="p">():</span> <span class="kt">SaxonProcessor</span>
<span class="p">{</span>
<span class="nv">$saxonProcessor</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">SaxonProcessor</span><span class="p">();</span>
<span class="nv">$saxonProcessor</span><span class="o">-></span><span class="nf">setConfigurationProperty</span><span class="p">(</span><span class="s1">'http://saxon.sf.net/feature/recognize-uri-query-parameters'</span><span class="p">,</span> <span class="s1">'true'</span><span class="p">);</span>
<span class="k">return</span> <span class="nv">$saxonProcessor</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
<p>Then we use that processor to do XSLT transformations:</p>
<pre><code class="php syntaxhl" data-language="php"><span class="nv">$saxonProcessor</span> <span class="o">=</span> <span class="nv">$this</span><span class="o">-></span><span class="n">saxonProcessorFactory</span><span class="o">-></span><span class="nf">get</span><span class="p">();</span>
<span class="nv">$transformer</span> <span class="o">=</span> <span class="nv">$saxonProcessor</span><span class="o">-></span><span class="nf">newXslt30Processor</span><span class="p">();</span>
<span class="k">foreach</span> <span class="p">(</span><span class="nv">$parameters</span> <span class="k">as</span> <span class="nv">$key</span> <span class="o">=></span> <span class="nv">$value</span><span class="p">)</span> <span class="p">{</span>
<span class="nv">$transformer</span><span class="o">-></span><span class="nf">setParameter</span><span class="p">(</span><span class="nv">$key</span><span class="p">,</span> <span class="nv">$saxonProcessor</span><span class="o">-></span><span class="nf">createAtomicValue</span><span class="p">(</span><span class="nv">$value</span><span class="p">));</span>
<span class="p">}</span>
<span class="nv">$transformer</span><span class="o">-></span><span class="nf">transformFileToFile</span><span class="p">(</span><span class="nv">$tmpFilePath</span><span class="p">,</span> <span class="nv">$xsltFilePath</span><span class="p">,</span> <span class="nv">$outputFile</span><span class="o">-></span><span class="nf">getPath</span><span class="p">());</span>
<span class="k">if</span> <span class="p">(</span><span class="nv">$transformer</span><span class="o">-></span><span class="nf">exceptionOccurred</span><span class="p">())</span> <span class="p">{</span>
<span class="nv">$exception</span> <span class="o">=</span> <span class="nc">SaxonXsltTransformException</span><span class="o">::</span><span class="nf">forXslTransformation</span><span class="p">(</span><span class="nv">$transformer</span><span class="p">,</span> <span class="nv">$tmpFilePath</span><span class="p">,</span> <span class="nv">$xsltFilePath</span><span class="p">);</span>
<span class="nv">$transformer</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>
<span class="k">throw</span> <span class="nv">$exception</span><span class="p">;</span>
<span class="p">}</span>
<span class="nv">$transformer</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>
</code></pre>
<p>The first time it runs fine (through for example unit tests), but the second time it gives a segmentation fault. I'm unable to debug this into a specific line or something that created the segmentation fault.</p>
<p>Are you guys able to help us out?</p> SaxonC - Feature #5834 (AwaitingInfo): Gizmo working with SaxonChttps://saxonica.plan.io/issues/58342023-01-18T17:50:44ZO'Neil Delprattoneil@saxonica.com
<p>It would be good to get the SaxonJ tool Gizmo working under SaxonC. This would probably be as a command-line tool.</p> SaxonJS - Bug #4990 (AwaitingInfo): saxon-js 2.2 no longer reads stylesheet URIs from web contexthttps://saxonica.plan.io/issues/49902021-05-14T14:39:04ZJohn Dziurlaj
<p>I am working on upgrading a project from SaxonJS 2.0 to 2.2. However, when upgrading this <code>webpack</code> project, I am getting an error regarding the resolution of the stylesheet, which is passed via URI:</p>
<p><code>[10:32:49 AM] uncaught exception: XError:Failed URI resolution: href=xslt/cvr_v1_json2xml.sef.json base=undefined -- TypeError: k is not a constructor; code:FODC0005</code></p>
<pre><code class="typescript syntaxhl" data-language="typescript"> <span class="nx">saxon</span><span class="p">.</span><span class="nx">transform</span><span class="p">({</span>
<span class="na">sourceText</span><span class="p">:</span> <span class="nx">wrappedJson</span><span class="p">,</span>
<span class="na">stylesheetLocation</span><span class="p">:</span> <span class="s2">`xslt/</span><span class="p">${</span><span class="nx">sefFile</span><span class="p">}</span><span class="s2">`</span><span class="p">,</span>
<span class="na">initialTemplate</span><span class="p">:</span> <span class="dl">"</span><span class="s2">start</span><span class="dl">"</span><span class="p">,</span>
<span class="na">destination</span><span class="p">:</span> <span class="dl">"</span><span class="s2">application</span><span class="dl">"</span>
<span class="p">},</span> <span class="nx">cb</span><span class="p">);</span>
</code></pre>
<p>I have checked by entering the SEF URL manually, and it resolves (Firefox and Chrome).</p>
<p>(see <code>cdftransformer.ts</code>) Full codebase <a href="https://github.com/HiltonRoscoe/CDFConverter/tree/saxonjs-upgrade" class="external">here</a></p> SaxonJS - Feature #4655 (AwaitingInfo): Standard-ESM importshttps://saxonica.plan.io/issues/46552020-07-24T18:15:30ZMichael Kaymike@saxonica.com
<p>Request received from Max Fechner by email:</p>
<p>Thank you for developing saxonJS!</p>
<p>It would be great if you could support standard-esm imports like</p>
<pre><code>import saxonJS from 'http://www.saxonica.com/saxon.js'
</code></pre>
<p>this would work in *deno as well as nodejs as well as modern browsers!</p>
<p>thank you for considering this proposal!</p>
<p>best, Max Fechner</p>