Mike Oliver-4 wrote:
>
> [EMAIL PROTECTED] 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.