OK, I made the necessary changes to get it to compile. I haven't
tested it, but I believe it should work.
I does not work, the element names are not written.
The output looks in the case of the DotCorpusSerializer like
this:
<?xml version="1.0" encoding="UTF-8"?>
<>
< ="corpus"/>
< ="TypeSystem.xml"/>
</>
I also found an other problem, there are error markers added to
the .corpus file,
but the adding fires a changed notification, it then tries to parse
the .corpus
file again, and then again add markers, this loops forever.
I will attach a fix for it to the jira issue or should I open a new
one ?
Tough I already addressed this problem, so I have to check why
my solution does not work in this case.
I suggest that we use in this places JAXP directly, its included
since java 1.4,
what do you think ?
I also looked at the code of the uima XMLSerializer and was wondering
why
the encoding and xml setting is dependent on the formating ?
if (isFormattedOutput) {
// set default output format
mTransformer.setOutputProperty(OutputKeys.INDENT, "yes");
mTransformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //
why formatting dependent ?
mTransformer.setOutputProperty("{http://xml.apache.org/xslt}indent-
amount", "4");
mTransformer.setOutputProperty(OutputKeys.METHOD, "xml"); // why
formatting dependent ?
}
Jörn