Bernd Kuemmerlen wrote:
> 
> we are using XXE to edit DocBook XML and commit the files to cvs. For
> this, we added XML comments of the form
> 
>    <!-- $Id$ -->
>    <!-- $Source$ -->
> 
> to the templates we use.
> 
> Currently, we have these comments just outside the document element, e.g.
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
> "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>
> <!--$Id$-->
> <!--$Source$-->
> <chapter>
>   ...
> </chapter>
> 
> When saving these files from XXE, we get
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
> "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";><!--$Id$--><!--$Source$-->
> <chapter>
>   ...
> </chapter>
> 
> i.e. the comments are put on one line with the DOCTYPE declaration.
> This is a problem for cvs, since it then can't resolve changes in the
> $Id$ and $Source$ keys.
> 
> When putting the comments inside the document element:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
> "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>
> <chapter>
>    <!--$Id$-->
>    <!--$Source$-->
>    ...
> </chapter>
> 
> they are saved "as-is", i.e. with the linebreaks.
> 
> I understand that the linebreaks and the whitespace are not relevant,
> but it seems that the handling shouldn't be different inside and outside
> the document element (unless there's a specific reason to do it like
> it's currently done).
> 
> Until then, as a workaround we move the comments inside the document
> element.

OK. You'll have it in XXE V2.4.

Reply via email to