[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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 hand. Regards, Tom P
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|