- changed component to Component-Segmenter
- changed component to Type-Enhancement
- removed component
- removed component
- assigned issue to
- changed title to Preserving comments from SRX files in Ratel
- changed status to open
Preserving comments from SRX files in Ratel
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)
-
Account Deleted -
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:
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.
-
Account Deleted - changed status to resolved
Comment [3.](https://code.google.com/p/okapi/issues/detail?id=61#c3) originally posted by @ysavourel on 2009-05-02T20:52:52.000Z:
The first comment before the <srx> element, the one before the <header> and the one before each <rule> are now preserved. they can also be modified from Ratel's UI.
- Log in to comment
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.