You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by kaushik <ka...@yahoo.com> on 2007/02/22 11:05:23 UTC

Versioning XML Documents

I am a novice in XML and Xerces. I came to know that the main 
advantage of XML is that we can work with multiple versions 
of XML documents. We can do it either by having a seperate
Version Attribute in the XML or we can have a schema based
versioning system. But i could not find a good example for 
doing(understand how to doit)  it. 
If you are aware of how to do it,  it would be of great help if 
you could share it with me or point me to some good web
links.
Thanks.
   
-- 
View this message in context: http://www.nabble.com/Versioning-XML-Documents-tf3271868.html#a9097093
Sent from the Xerces - C - Users mailing list archive at Nabble.com.


Re: Versioning XML Documents

Posted by Ivan Pechorin <iv...@gmail.com>.
Hi!

My understanding is that using versioning system for XML requires some
discipline, cause not all the changes in XML textual file are actually
change the XML document.

Just google for "version control of xml documents"

P.S. I found some tips regarding XML versioning from Oracle
documentation useful for me:
http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3/state/content/navId.4/navSetId._/vtTopicFile.teamworking%7Cscs%7Cscs_u_writingversioncontrollablexml~html/

Best regards,
Ivan


On 2/23/07, 4pzbrog02@sneakemail.com <4p...@sneakemail.com> wrote:
> I'm not really sure what you want exactly, however, the 'good for
> versioning' argument for XML you're quoting usually refers to its
> textual nature.
>
> Text files are very easy to maintain in a versioning system like
> subversion, perforce, or CVS, because with such a system you can turn
> back time and look at older versions of the file. Thing is, with a file
> in a textual format (like XML), you can use tools like Araxis Merge,
> WinDiff or TortoiseMerge to compare the files and get the changed lines
> highlighted. Also, since such a system typically only stores the
> differences, the repository (where all the data is stored) requires much
> less space.
>
> Xerces itself has no versioning support.
>
> If this is what you're looking for, you should have a look at
> http://www.subversion.org, which is a quite good open source versioning
> system.
>
>
> Uwe
>
> kaushik kaushik_zadoo-at-yahoo.com |xerces-c-users mailing list| schrieb:
> > I am a novice in XML and Xerces. I came to know that the main
> > advantage of XML is that we can work with multiple versions
> > of XML documents. We can do it either by having a seperate
> > Version Attribute in the XML or we can have a schema based
> > versioning system. But i could not find a good example for
> > doing(understand how to doit)  it.
> > If you are aware of how to do it,  it would be of great help if
> > you could share it with me or point me to some good web
> > links.
> > Thanks.
> >
> >
>
>

Re: Versioning XML Documents

Posted by 4p...@sneakemail.com.
I'm not really sure what you want exactly, however, the 'good for 
versioning' argument for XML you're quoting usually refers to its 
textual nature.

Text files are very easy to maintain in a versioning system like 
subversion, perforce, or CVS, because with such a system you can turn 
back time and look at older versions of the file. Thing is, with a file 
in a textual format (like XML), you can use tools like Araxis Merge, 
WinDiff or TortoiseMerge to compare the files and get the changed lines 
highlighted. Also, since such a system typically only stores the 
differences, the repository (where all the data is stored) requires much 
less space.

Xerces itself has no versioning support.

If this is what you're looking for, you should have a look at 
http://www.subversion.org, which is a quite good open source versioning 
system.


Uwe

kaushik kaushik_zadoo-at-yahoo.com |xerces-c-users mailing list| schrieb:
> I am a novice in XML and Xerces. I came to know that the main 
> advantage of XML is that we can work with multiple versions 
> of XML documents. We can do it either by having a seperate
> Version Attribute in the XML or we can have a schema based
> versioning system. But i could not find a good example for 
> doing(understand how to doit)  it. 
> If you are aware of how to do it,  it would be of great help if 
> you could share it with me or point me to some good web
> links.
> Thanks.
>    
>   


Re: Versioning XML Documents

Posted by kaushik <ka...@yahoo.com>.


Mike Oliver-4 wrote:
> 
> 4pzbrog02@sneakemail.com wrote:
>> I'm not really sure what you want exactly, however, the 'good for 
>> versioning' argument for XML you're quoting usually refers to its 
>> textual nature.
> 
> Actually I doubt that's what Kaushik means.  Probably he's talking
> about the fact that you can have different versions of the *grammar*.
> It is indeed very easy to do this in XML, from the syntax side, because
> the top of the document points to DTD or XSD files, and if you want
> to change the grammar but still have old documents parse, you just
> keep the old DTD/XSD where it is, and have new documents point
> to the new one.
> 
> But that's just syntax; semantics is a lot harder.  Every time
> you work this trick, you have to update your parser code so that
> it does the right thing with both the old grammar and the new
> one.  That can force you to keep around obsolete data members
> in your C++ classes, so that maintaining them gets steadily
> harder and more error prone, as does maintaining the parser
> code itself.
> 
> 
> 
Hi,
   Sorry for the late reply..Yes indeed i am looking for a versioning
mechanism which will 
allow me to have different grammers. For example i may have new attributes
added to an
element in a future grammer of the XML. 
For example i may have an XML element "Address" having attributes
"House-Number",
"street-number" and "state". In future i may want to add an element
"country" to it. But
i would like the parser to work for both the old and new documents. XSD or
DTD may 
be used, but could not find any example of how it is actually done. I guess
my "Brain"
has stopped working :(
-- 
View this message in context: http://www.nabble.com/Versioning-XML-Documents-tf3271868.html#a9154184
Sent from the Xerces - C - Users mailing list archive at Nabble.com.