Preserving comments from SRX files in Ratel

Issue #61 resolved
Former user created an issue

Original [issue 61](https://code.google.com/p/okapi/issues/detail?id=61) created by marcin.milkow... on 2009-05-02T12:30:19.000Z:

In case when the source SRX file contained comments (such as important copyright and license information), it gets removed after editing with Ratel. Also comments concerning individual rules are very useful, and shouldn't be removed.

I think this is a feature request more than a bug report but anyway, I don't want to script adding copyright info after every edit, and I want to have comments concerning individual rules. XML editors shouldn't remove comments in general.

Thanks.

Comments (3)

  1. Former user Account Deleted

    Comment [1.](https://code.google.com/p/okapi/issues/detail?id=61#c1) originally posted by @ysavourel on 2009-05-02T15:25:44.000Z:

    While it would be a nice feature, it will be difficult to save all comments anywhere in the document, as it is only read and converted to an internal non-XML representation. However, we can associate a comment with most of the SRX objects, and take it from the document comments. Do you have commented example files you can share?

    In a second step we can make those comments visible and/or editable so they can be entered from the UI. This will be for later.

  2. Former user Account Deleted

    Comment [2.](https://code.google.com/p/okapi/issues/detail?id=61#c2) originally posted by marcin.milkow... on 2009-05-02T15:49:10.000Z:

    Yes, I know that it's not trivial, as the XML parser doesn't see the comments. For an example, you can see this file:

    http://languagetool.cvs.sourceforge.net/viewvc/languagetool/JLanguageTool/src/resource/segment.srx?revision=1.3&view=markup

    Basically, only two places seem reasonable for comments:

    (1) header which should always be preserved (copyright, comments, version, etc.)

    (2) individual rules.

    Ability to add comments via UI would be great.

  3. Log in to comment