NullPointerException in streaming mode with parameter in XPath expression

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

NullPointerException in streaming mode with parameter in XPath expression

Joachim Selke
Hi,

Saxon-EE 9.6.0.6J gives me a strange NullPointerException, which only
occurs in streaming mode. If I run the same document without streaming
mode, everything works// as expected. The issue seems to be related to
using a parameter in an XPath expression.

Below is a stylesheet that illustrates the problem. I want to iterate
over all nodes whose name matches the parameter.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="3.0">
  <xsl:param name="node-name" required="yes"/>
  <xsl:mode streamable="yes"/>
  <xsl:template match="/">
    <root>
      <xsl:for-each select="//node()[name() = $node-name]">
        <found/>
      </xsl:for-each>
    </root>
  </xsl:template>
</xsl:stylesheet>


Here is an example input document:

<?xml version="1.0" encoding="UTF-8"?>
<data>
    <record>
        <a>abc</a>
        <b>def</b>
    </record>
    <record>
        <a>abc</a>
        <b>def</b>
    </record>
</data>


Here is how I run Saxon from command line:

java -cp SaxonEE9-6-0-6J/saxon9ee.jar net.sf.saxon.Transform -s:in.xml
-xsl:stylesheet.xsl -o:out.xml node-name=record


I use a Linux system. My Java Runtime Engine is (output of "java -version"):

openjdk version "1.8.0_45"
OpenJDK Runtime Environment (build 1.8.0_45-b14)
OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)


If I remove the xsl:mode element in the stylesheet, I get the expected
result (<root><found/><found/></root>). In streaming mode, I get the
following exception:

java.lang.NullPointerException
    at
net.sf.saxon.expr.XPathContextMajor.getTargetComponent(XPathContextMajor.java:778)
    at
net.sf.saxon.expr.XPathContextMinor.getTargetComponent(XPathContextMinor.java:554)
    at
net.sf.saxon.expr.GlobalVariableReference.evaluateVariable(GlobalVariableReference.java:93)
    at
com.saxonica.ee.optim.IndexedLookupExpression.effectiveBooleanValue(IndexedLookupExpression.java:266)
    at
net.sf.saxon.pattern.PatternWithPredicate.matchesPredicate(PatternWithPredicate.java:119)
    at
net.sf.saxon.pattern.PatternWithPredicate.matchesBeneathAnchor(PatternWithPredicate.java:138)
    at
com.saxonica.ee.stream.watch.PatternWatch.matchesNode(PatternWatch.java:33)
    at
com.saxonica.ee.stream.watch.WatchManager.startElement(WatchManager.java:208)
    at
net.sf.saxon.event.StartTagBuffer.startContent(StartTagBuffer.java:220)
    at
net.sf.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:356)
    at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
    at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:379)
    at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:605)
    at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3138)
    at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:880)
    at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
    at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
    at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
    at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
    at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
    at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
    at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
    at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
    at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:441)
    at net.sf.saxon.event.Sender.send(Sender.java:172)
    at net.sf.saxon.Controller.transformStream(Controller.java:2319)
    at net.sf.saxon.Controller.transform(Controller.java:1666)
    at
net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:547)
    at net.sf.saxon.Transform.processFile(Transform.java:1056)
    at net.sf.saxon.Transform.doTransform(Transform.java:659)
    at net.sf.saxon.Transform.main(Transform.java:80)
java.lang.NullPointerException
    at
net.sf.saxon.expr.XPathContextMajor.getTargetComponent(XPathContextMajor.java:778)
    at
net.sf.saxon.expr.XPathContextMinor.getTargetComponent(XPathContextMinor.java:554)
    at
net.sf.saxon.expr.GlobalVariableReference.evaluateVariable(GlobalVariableReference.java:93)
    at
com.saxonica.ee.optim.IndexedLookupExpression.effectiveBooleanValue(IndexedLookupExpression.java:266)
    at
net.sf.saxon.pattern.PatternWithPredicate.matchesPredicate(PatternWithPredicate.java:119)
    at
net.sf.saxon.pattern.PatternWithPredicate.matchesBeneathAnchor(PatternWithPredicate.java:138)
    at
com.saxonica.ee.stream.watch.PatternWatch.matchesNode(PatternWatch.java:33)
    at
com.saxonica.ee.stream.watch.WatchManager.startElement(WatchManager.java:208)
    at
net.sf.saxon.event.StartTagBuffer.startContent(StartTagBuffer.java:220)
    at
net.sf.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:356)
    at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
    at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:379)
    at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:605)
    at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3138)
    at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:880)
    at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
    at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
    at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
    at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
    at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
    at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
    at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
    at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
    at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:441)
    at net.sf.saxon.event.Sender.send(Sender.java:172)
    at net.sf.saxon.Controller.transformStream(Controller.java:2319)
    at net.sf.saxon.Controller.transform(Controller.java:1666)
    at
net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:547)
    at net.sf.saxon.Transform.processFile(Transform.java:1056)
    at net.sf.saxon.Transform.doTransform(Transform.java:659)
    at net.sf.saxon.Transform.main(Transform.java:80)
Fatal error during transformation: java.lang.NullPointerException:  (no
message)


This issue also does not occur if I remove the parameter and replace it
with a string literal ('record') in the XPath expression.

Any ideas on how to resolve or work around this issue?

Best,
Joachim


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException in streaming mode with parameter in XPath expression

Michael Kay
Clearly a bug: we’ll investigate. The stack trace shows that it is connected with evaluating a global variable while evaluating a pattern; it appears that in streaming mode, there’s something missing in the evaluation context when this happens.

Michael Kay
Saxonica

> On 4 Jul 2015, at 12:58, Joachim Selke <[hidden email]> wrote:
>
> Hi,
>
> Saxon-EE 9.6.0.6J gives me a strange NullPointerException, which only
> occurs in streaming mode. If I run the same document without streaming
> mode, everything works// as expected. The issue seems to be related to
> using a parameter in an XPath expression.
>
> Below is a stylesheet that illustrates the problem. I want to iterate
> over all nodes whose name matches the parameter.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="3.0">
>  <xsl:param name="node-name" required="yes"/>
>  <xsl:mode streamable="yes"/>
>  <xsl:template match="/">
>    <root>
>      <xsl:for-each select="//node()[name() = $node-name]">
>        <found/>
>      </xsl:for-each>
>    </root>
>  </xsl:template>
> </xsl:stylesheet>
>
>
> Here is an example input document:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <data>
>    <record>
>        <a>abc</a>
>        <b>def</b>
>    </record>
>    <record>
>        <a>abc</a>
>        <b>def</b>
>    </record>
> </data>
>
>
> Here is how I run Saxon from command line:
>
> java -cp SaxonEE9-6-0-6J/saxon9ee.jar net.sf.saxon.Transform -s:in.xml
> -xsl:stylesheet.xsl -o:out.xml node-name=record
>
>
> I use a Linux system. My Java Runtime Engine is (output of "java -version"):
>
> openjdk version "1.8.0_45"
> OpenJDK Runtime Environment (build 1.8.0_45-b14)
> OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)
>
>
> If I remove the xsl:mode element in the stylesheet, I get the expected
> result (<root><found/><found/></root>). In streaming mode, I get the
> following exception:
>
> java.lang.NullPointerException
>    at
> net.sf.saxon.expr.XPathContextMajor.getTargetComponent(XPathContextMajor.java:778)
>    at
> net.sf.saxon.expr.XPathContextMinor.getTargetComponent(XPathContextMinor.java:554)
>    at
> net.sf.saxon.expr.GlobalVariableReference.evaluateVariable(GlobalVariableReference.java:93)
>    at
> com.saxonica.ee.optim.IndexedLookupExpression.effectiveBooleanValue(IndexedLookupExpression.java:266)
>    at
> net.sf.saxon.pattern.PatternWithPredicate.matchesPredicate(PatternWithPredicate.java:119)
>    at
> net.sf.saxon.pattern.PatternWithPredicate.matchesBeneathAnchor(PatternWithPredicate.java:138)
>    at
> com.saxonica.ee.stream.watch.PatternWatch.matchesNode(PatternWatch.java:33)
>    at
> com.saxonica.ee.stream.watch.WatchManager.startElement(WatchManager.java:208)
>    at
> net.sf.saxon.event.StartTagBuffer.startContent(StartTagBuffer.java:220)
>    at
> net.sf.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:356)
>    at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:379)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:605)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3138)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:880)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
>    at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
>    at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
>    at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
>    at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
>    at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
>    at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:441)
>    at net.sf.saxon.event.Sender.send(Sender.java:172)
>    at net.sf.saxon.Controller.transformStream(Controller.java:2319)
>    at net.sf.saxon.Controller.transform(Controller.java:1666)
>    at
> net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:547)
>    at net.sf.saxon.Transform.processFile(Transform.java:1056)
>    at net.sf.saxon.Transform.doTransform(Transform.java:659)
>    at net.sf.saxon.Transform.main(Transform.java:80)
> java.lang.NullPointerException
>    at
> net.sf.saxon.expr.XPathContextMajor.getTargetComponent(XPathContextMajor.java:778)
>    at
> net.sf.saxon.expr.XPathContextMinor.getTargetComponent(XPathContextMinor.java:554)
>    at
> net.sf.saxon.expr.GlobalVariableReference.evaluateVariable(GlobalVariableReference.java:93)
>    at
> com.saxonica.ee.optim.IndexedLookupExpression.effectiveBooleanValue(IndexedLookupExpression.java:266)
>    at
> net.sf.saxon.pattern.PatternWithPredicate.matchesPredicate(PatternWithPredicate.java:119)
>    at
> net.sf.saxon.pattern.PatternWithPredicate.matchesBeneathAnchor(PatternWithPredicate.java:138)
>    at
> com.saxonica.ee.stream.watch.PatternWatch.matchesNode(PatternWatch.java:33)
>    at
> com.saxonica.ee.stream.watch.WatchManager.startElement(WatchManager.java:208)
>    at
> net.sf.saxon.event.StartTagBuffer.startContent(StartTagBuffer.java:220)
>    at
> net.sf.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:356)
>    at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:379)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:605)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3138)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:880)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
>    at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
>    at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
>    at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
>    at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
>    at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
>    at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:441)
>    at net.sf.saxon.event.Sender.send(Sender.java:172)
>    at net.sf.saxon.Controller.transformStream(Controller.java:2319)
>    at net.sf.saxon.Controller.transform(Controller.java:1666)
>    at
> net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:547)
>    at net.sf.saxon.Transform.processFile(Transform.java:1056)
>    at net.sf.saxon.Transform.doTransform(Transform.java:659)
>    at net.sf.saxon.Transform.main(Transform.java:80)
> Fatal error during transformation: java.lang.NullPointerException:  (no
> message)
>
>
> This issue also does not occur if I remove the parameter and replace it
> with a string literal ('record') in the XPath expression.
>
> Any ideas on how to resolve or work around this issue?
>
> Best,
> Joachim
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help 


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException in streaming mode with parameter in XPath expression

Michael Kay
In reply to this post by Joachim Selke
Please track progress on the issue here:

https://saxonica.plan.io/issues/2412

Michael Kay
Saxonica

> On 4 Jul 2015, at 12:58, Joachim Selke <[hidden email]> wrote:
>
> Hi,
>
> Saxon-EE 9.6.0.6J gives me a strange NullPointerException, which only
> occurs in streaming mode. If I run the same document without streaming
> mode, everything works// as expected. The issue seems to be related to
> using a parameter in an XPath expression.
>
> Below is a stylesheet that illustrates the problem. I want to iterate
> over all nodes whose name matches the parameter.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="3.0">
>  <xsl:param name="node-name" required="yes"/>
>  <xsl:mode streamable="yes"/>
>  <xsl:template match="/">
>    <root>
>      <xsl:for-each select="//node()[name() = $node-name]">
>        <found/>
>      </xsl:for-each>
>    </root>
>  </xsl:template>
> </xsl:stylesheet>
>
>
> Here is an example input document:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <data>
>    <record>
>        <a>abc</a>
>        <b>def</b>
>    </record>
>    <record>
>        <a>abc</a>
>        <b>def</b>
>    </record>
> </data>
>
>
> Here is how I run Saxon from command line:
>
> java -cp SaxonEE9-6-0-6J/saxon9ee.jar net.sf.saxon.Transform -s:in.xml
> -xsl:stylesheet.xsl -o:out.xml node-name=record
>
>
> I use a Linux system. My Java Runtime Engine is (output of "java -version"):
>
> openjdk version "1.8.0_45"
> OpenJDK Runtime Environment (build 1.8.0_45-b14)
> OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)
>
>
> If I remove the xsl:mode element in the stylesheet, I get the expected
> result (<root><found/><found/></root>). In streaming mode, I get the
> following exception:
>
> java.lang.NullPointerException
>    at
> net.sf.saxon.expr.XPathContextMajor.getTargetComponent(XPathContextMajor.java:778)
>    at
> net.sf.saxon.expr.XPathContextMinor.getTargetComponent(XPathContextMinor.java:554)
>    at
> net.sf.saxon.expr.GlobalVariableReference.evaluateVariable(GlobalVariableReference.java:93)
>    at
> com.saxonica.ee.optim.IndexedLookupExpression.effectiveBooleanValue(IndexedLookupExpression.java:266)
>    at
> net.sf.saxon.pattern.PatternWithPredicate.matchesPredicate(PatternWithPredicate.java:119)
>    at
> net.sf.saxon.pattern.PatternWithPredicate.matchesBeneathAnchor(PatternWithPredicate.java:138)
>    at
> com.saxonica.ee.stream.watch.PatternWatch.matchesNode(PatternWatch.java:33)
>    at
> com.saxonica.ee.stream.watch.WatchManager.startElement(WatchManager.java:208)
>    at
> net.sf.saxon.event.StartTagBuffer.startContent(StartTagBuffer.java:220)
>    at
> net.sf.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:356)
>    at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:379)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:605)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3138)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:880)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
>    at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
>    at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
>    at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
>    at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
>    at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
>    at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:441)
>    at net.sf.saxon.event.Sender.send(Sender.java:172)
>    at net.sf.saxon.Controller.transformStream(Controller.java:2319)
>    at net.sf.saxon.Controller.transform(Controller.java:1666)
>    at
> net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:547)
>    at net.sf.saxon.Transform.processFile(Transform.java:1056)
>    at net.sf.saxon.Transform.doTransform(Transform.java:659)
>    at net.sf.saxon.Transform.main(Transform.java:80)
> java.lang.NullPointerException
>    at
> net.sf.saxon.expr.XPathContextMajor.getTargetComponent(XPathContextMajor.java:778)
>    at
> net.sf.saxon.expr.XPathContextMinor.getTargetComponent(XPathContextMinor.java:554)
>    at
> net.sf.saxon.expr.GlobalVariableReference.evaluateVariable(GlobalVariableReference.java:93)
>    at
> com.saxonica.ee.optim.IndexedLookupExpression.effectiveBooleanValue(IndexedLookupExpression.java:266)
>    at
> net.sf.saxon.pattern.PatternWithPredicate.matchesPredicate(PatternWithPredicate.java:119)
>    at
> net.sf.saxon.pattern.PatternWithPredicate.matchesBeneathAnchor(PatternWithPredicate.java:138)
>    at
> com.saxonica.ee.stream.watch.PatternWatch.matchesNode(PatternWatch.java:33)
>    at
> com.saxonica.ee.stream.watch.WatchManager.startElement(WatchManager.java:208)
>    at
> net.sf.saxon.event.StartTagBuffer.startContent(StartTagBuffer.java:220)
>    at
> net.sf.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:356)
>    at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:379)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:605)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3138)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:880)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
>    at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
>    at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
>    at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
>    at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
>    at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
>    at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:441)
>    at net.sf.saxon.event.Sender.send(Sender.java:172)
>    at net.sf.saxon.Controller.transformStream(Controller.java:2319)
>    at net.sf.saxon.Controller.transform(Controller.java:1666)
>    at
> net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:547)
>    at net.sf.saxon.Transform.processFile(Transform.java:1056)
>    at net.sf.saxon.Transform.doTransform(Transform.java:659)
>    at net.sf.saxon.Transform.main(Transform.java:80)
> Fatal error during transformation: java.lang.NullPointerException:  (no
> message)
>
>
> This issue also does not occur if I remove the parameter and replace it
> with a string literal ('record') in the XPath expression.
>
> Any ideas on how to resolve or work around this issue?
>
> Best,
> Joachim
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help 


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help