Saxonica Developer Community: Issueshttps://saxonica.plan.io/https://saxonica.plan.io/favicon.ico2024-01-18T15:48:06ZSaxonica Developer Community
Planio 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 - 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> SaxonC - Bug #5344 (In Progress): java.lang.UnsatisfiedLinkError: Can't load library: /C:/Progra...https://saxonica.plan.io/issues/53442022-02-21T23:01:47ZO'Neil Delprattoneil@saxonica.com
<p>Reported by user in the forum post: <a href="https://saxonica.plan.io/boards/4/topics/8562" class="external">https://saxonica.plan.io/boards/4/topics/8562</a></p>
<p>Writing an extension function on Windows C++ and PHP currently fails with the following error message:</p>
<pre><code> java.lang.UnsatisfiedLinkError: Can't load library: /C:/Program Files/Saxonica/SaxonC EE 11.2/samples/cppTests/cppExtensionFunction.dll
</code></pre>
<p>The failure is in the Java code. We incorrectly create a leading slash: We are failing resolve the file path. Specifically the cwd is not currently been passed and we fail the fallback of using the SAXONC_HOME environment variable.</p> SaxonJS - Feature #5082 (In Progress): inherit-namespaces="no" not setting xmlns="" (Saxon Bug #4...https://saxonica.plan.io/issues/50822021-09-07T06:41:55ZAir Quick
<p><a href="https://saxonica.plan.io/issues/4696" class="external">https://saxonica.plan.io/issues/4696</a> is reproduced on Saxon-JS 2.3.</p>
<pre><code>$ cat test.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet exclude-result-prefixes="#all" version="3.0" xmlns:x="x"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" />
<xsl:template as="element(x:description)" name="xsl:initial-template">
<xsl:element inherit-namespaces="no" name="description" namespace="x">
<x:scenario>
<e />
</x:scenario>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
$ npx xslt3 -it -xsl:test.xsl
npx: installed 4 in 1.226s
<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="x">
<x:scenario xmlns:x="x">
<e/>
</x:scenario>
</description>
</code></pre> 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> 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> 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> SaxonC - Bug #4178 (In Progress): License file not found with symbolic linkshttps://saxonica.plan.io/issues/41782019-03-25T10:48:28ZO'Neil Delprattoneil@saxonica.com
<p>Reported by user:</p>
<p>There's a bit of inconsistency over how co-locating the licence file and libsaxoneec.so works when used with softlinks.</p>
<p>Soft linking libraries is pretty typical in /usr/lib so I think Saxon should support this.</p>
<p>If I have the below setup in /usr/lib it doesn't work:</p>
<p>lrwxrwxrwx 1 root root 43 Mar 21 22:27 /usr/lib/libsaxoneec.so -> /opt/Saxonica/Saxon-EEC1.1.2/libsaxoneec.so<br>
lrwxrwxrwx 1 root root 31 Oct 16 14:53 /usr/lib/saxon-license.lic -> /opt/Saxonica/saxon-license.lic</p>
<p>Guessing that the softlink for libsaxoneec.so is resolved to it's real path I tried putting saxon-licence.lic in the same directory, but it doesn't work either:</p>
<p>/opt/Saxonica/Saxon-EEC1.1.2/</p>
<p>Some sort of resolving required.</p> SaxonC - Feature #3705 (In Progress): Build PHP extension of Saxon for Windowshttps://saxonica.plan.io/issues/37052018-02-28T14:45:56ZO'Neil Delprattoneil@saxonica.com
<p>Reported here: <a href="https://stackoverflow.com/questions/49010431/build-php-extension-of-saxon-for-windows" class="external">https://stackoverflow.com/questions/49010431/build-php-extension-of-saxon-for-windows</a></p>
<p>Bug issue created to track the progress of building a PHP extension for Saxon/C 1.1.0 on windows.</p> SaxonC - Support #2136 (In Progress): php_saxon.dll on WAMPhttps://saxonica.plan.io/issues/21362014-08-26T15:02:11ZMark Forstermark@loadsbetter.com
<p>Hi,</p>
<p>This is my first support issue so I'll try to do it properly but I may get things muddle up a bit.</p>
<p>I've developed a lot with XSLT 1.0 and I've started developing with Saxon CE to learn more about XSLT 2.0 and now I want to do more, like schema-aware processing.</p>
<p>I've tried to get Saxon HE to work on WAMP server 2.4. I think I've done everything correctly but I get this error that appears in the Apache error log.</p>
<p>c:/wamp/bin/php/php5.4.12/ext/php_saxon.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0</p>
<p>I've tried to search for an answer but I haven't found anything that helps.</p>
<p>I'm not particularly expert at WAMP. I've installed it so I can develop with PHP on my Windows PC, which has Windows 7 Home Premium Service Pack 1 64-bit operating system.</p>
<p>Many thanks for any help you can give me.</p>
<p>Mark</p> SaxonC - Support #1960 (In Progress): PHP Windows builds required for the different compiler vers...https://saxonica.plan.io/issues/19602013-12-16T09:26:00ZO'Neil Delprattoneil@saxonica.com
<p>Bug reported by Vasil Rangelov,</p>
<p>I've tried all of the combos with this DDL, and sadly, it's only</p>
<p>useful for PHP 5.4.* TS VC9 x86 builds, and nothing else (that is,</p>
<p>other combos don't even register at phpinfo()).</p>
<p>The necessary binaries for addressing all common Windows PHP setups would be:</p>
<p>PHP 5.4 TS VC9</p>
<p>PHP 5.4 NTS VC9</p>
<p>PHP 5.5 TS VC11</p>
<p>PHP 5.5 NTS VC11</p>
<p>(all x86)</p>
<p>I also tested PHP 5.3 (N)TS VC9 x86, and that too doesn't work. While</p>
<p>I see no reason not to also make PHP 5.3 VC9 (N)TS binaries, the PHP</p>
<p>5.3 is now in "security fixes only" mode, soon to be completely</p>
<p>EOL-ed, so IMHO, it's OK to not have it... it would hopefully</p>
<p>encourage more people to upgrade.</p>