OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help needed!

[Eric van der Vlist]

> Venugopal Siripuram wrote:
> >
> >  But this is not a good practice..U need to define DTD  first and then
> > generate XML as per DTD..
> Why is this a better practice ;=) ?
Because XML Spy - or any other reverse engineering attemtpt to create a
schema or dtd - creates a result that fits the instance but not a more
general model.  For example, if you have this:

<p name='p1'/><p name='p2'/>

The reverse-engineered schema/dtd may only allow the "name" attribute to
have the two values (p1|p2).  (I'm not sure what Spy does with this exact
example because I don't have it on this computer, but it does thngs like
this).  You can get even larger distortions, including substantial changes
in the content models compared with what you started with (either a real or
imaginary dtd).

I don't see what value there is in having a dtd that only fits one or a few
instances, so I would not use this capability in an automated way.  But it
can be very handy as a starting point if you go on to tune the results up by


Tom P