Closed gimsieke closed 2 years ago
I will take a look. Off the top of my head, it sounds like you're using a different Processor
than the one XML Calabash is using. If you have your own, make sure you pass it to the constructor when you initialize XML Calabash.
If they have different Processor
s, they'll have different name pools. (Well, I think technically, that's at a lower level, but it's still my first guess.)
Thanks Norm, this might be a very useful hint.
@pmarkwart, if you compare, for example, the RNG extension’s use of processor with the MathType Extension’s, the former uses the XProcRuntime
’s processor while the latter tries to get a new one: Processor proc = new Processor(false);
.
I wonder why that worked with Saxon 9.x all the time.
Thank you, that was the problem. It worked in saxon 9.x because the TreeWriter takes the runtime and I assume it grabbed the processor from there.
We have successfully migrated some pipelines and extensions to a Saxon-10-powered version of XML Calabash. However, the MathType→MathML extension will always mix up the element names in the output.
My colleague Paul (@pmarkwart) put together an off-the-shelf Calabash 1.3.2-100 and the extension, compiled against said Calabash and Saxon PE 10.5 (same results when using HE 10.5 that is bundled with Calabash), plus sample input and some documentation about invocation and expected vs. actual output. You can download NamePoolErrorMessage.zip for 30 days.
Paul already saw that the output is still Ok when it is returned from the included JRuby MTEF parser, but gets garbled when inserted into an XProc document (or when serialized). Maybe you can easier spot what’s going on here or what needs to be changed in the extension’s Java code that has been working with Saxon 9.x versions of XML Calabash.