Actions
Bug #2153
closedException using parse-xml-fragment function with linked tree model
Start date:
2014-09-26
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
Description
When I executing the XPath expression with s9api:
parse-xml-fragment(\"<alpha>abcd</alpha><beta>abcd</beta>\")
I have obtained the next exception:
Exception in thread "main" java.lang.IllegalStateException: startContent() called more than once
at net.sf.saxon.tree.linked.LinkedTreeBuilder.startContent(LinkedTreeBuilder.java:220)
at net.sf.saxon.event.ProxyReceiver.startContent(ProxyReceiver.java:177)
at net.sf.saxon.event.ProxyReceiver.startContent(ProxyReceiver.java:177)
at net.sf.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:351)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:428)
at net.sf.saxon.event.Sender.send(Sender.java:144)
at com.saxonica.functions.xpath3.ParseXmlFragment.evalParseXml(ParseXmlFragment.java:135)
at com.saxonica.functions.xpath3.ParseXmlFragment.evaluateItem(ParseXmlFragment.java:53)
at com.saxonica.functions.xpath3.ParseXmlFragment.evaluateItem(ParseXmlFragment.java:30)
at net.sf.saxon.expr.Expression.iterate(Expression.java:499)
at net.sf.saxon.sxpath.XPathExpression.iterate(XPathExpression.java:163)
at net.sf.saxon.s9api.XPathSelector.iterator(XPathSelector.java:208)
at ro.sync.test.RunXPathWithSaxon.runQueryWithS9API(RunXPathWithSaxon.java:40)
at ro.sync.test.RunXPathWithSaxon.main(RunXPathWithSaxon.java:56)
I have attached a Java file: RunXPathWithSaxon.java that can be used to obtain the reported exception. In my tests I have used the latest Saxon library 9.5.1.7.
Files
Please register to edit this issue
Actions