Hello
I put several CVS stuff into the properties of the root element of the 
file : chapter, book, article, and so on.
They have all version, date, user properties.
HTH
Michka:-)

Bernd Kuemmerlen a ?crit:

> Hi there,
>
> 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.
>
> Thanks
>     Bernd
>
> -- 
> XMLmind XML Editor Support List
> xmleditor-support at xmlmind.com
> http://www.xmlmind.com/mailman/listinfo/xmleditor-support
>



Reply via email to