[
https://issues.apache.org/jira/browse/UIMA-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13179652#comment-13179652
]
Marshall Schor commented on UIMA-239:
-------------------------------------
The docs for JAXB indicate you can do something like:
1) create an xml infoset (DOM tree) that keeps white space and xml comments
2) unmarshall that into Java objects (skips/ignores whitespace and xml
comments, Java objects have no idea about these)
3) update the Java objects
4) update the infoset with those updates - this "merges" into the existing
infoset, so it is supposed to preserve the comments, etc. Then you can write
this out to xml.
There's some newsgroup discussion indicating there may be some issues with this
(from 2009), so it will need to be tested. This approach has the advantage
that only those users who need this will need to preserve the infoset.
> Tools like the CDE which use XML parsing should preserve XML comments;
> parsers should provide access to XML comments.
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: UIMA-239
> URL: https://issues.apache.org/jira/browse/UIMA-239
> Project: UIMA
> Issue Type: Improvement
> Components: Core Java Framework, Tools
> Reporter: Marshall Schor
>
> An example of a problem which happens if this is not done: the descriptors
> that come with the UIMA toolkit have a comment that specifies the license
> information for that file. If you edit a descriptor containing such a comment
> with the CDE, it strips out all comments.
> An alternative for license info: add a new, optional element to the
> descriptor for specifying the license (but this might be ambigious as to
> what is being licensed - the descriptor file or what it refers to or ??? )
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira