Bug #2073
closedCan't use XML from string
100%
Description
When I try to load my XML from a string (using parseString and then setSourceValue), showing the result fails, it can't transform. It looks like the XML to XdmValue is not correct.
When I write the same file to a temporary file and use setSourceFile, everything works fine.
PHP version 5.4.
Updated by O'Neil Delpratt almost 10 years ago
- Category set to PHP API
- Status changed from New to In Progress
- Assignee set to O'Neil Delpratt
- Found in version set to 0.2
Thanks for reporting the bug you have found. I managed to reproduce it and I am now investigating it.
Updated by O'Neil Delpratt almost 10 years ago
- Status changed from In Progress to Resolved
- Priority changed from Low to Normal
- % Done changed from 0 to 100
This bug has now been fixed which will be available in the next release.
The issue was after we create the XsltProcessor
object we then create the XQueryProcessor
using the java constructor which creates a new Processor
object; this has the effect of overwriting the Processor
object in the c++ controller class, i.e. SaxonProcessor@. We now create the @Processor
object from the SaxonProcessor which is then reused in the XsltProcessor
and @XQueryProcessor@, respectively.
What I found useful was to look at the php log file. We see the java exception below, which gave clues as to what was happening:
Exception in thread "main" java.lang.IllegalArgumentException: Externally supplied NodeInfo belongs to the wrong Configuration
at net.sf.saxon.Configuration.unravel(Configuration.java:3087)
at net.sf.saxon.Controller.prepareInputTree(Controller.java:1955)
at net.sf.saxon.Controller.transform(Controller.java:1846)
at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:450)
at net.sf.saxon.option.cpp.XsltProcessorForCpp.xsltApplyStylesheet(XsltProcessorForCpp.java:340)
Updated by O'Neil Delpratt almost 10 years ago
- Status changed from Resolved to Closed
- Fixed in version set to 0.3.1
Bug fixed in Saxon/C bete release 0.3.1
Please register to edit this issue