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: Generating a DTD from XML files?



Hiya,
         But xmlspy is a trial version and is valid only for 30 days or
so...
         Is there any long term tool for this?

Thanks in Advance
Murali

> ----------
> From: 	Duane Nickull[SMTP:duane@xmlglobal.com]
> Sent: 	Thursday, May 17, 2001 3:15 PM
> To: 	Rob Lawson; xml-dev@lists.xml.org
> Subject: 	Re: Generating a DTD from XML files?
> 
> > Does anyone know a utility or package to generate a basic DTD from XML
> > files?
> >>>
> 
> XML Spy and many other packages will do this for you, however,  you will
> have to edit the DTD by hand afterwards to fix cardinality rules.  There
> is
> no way that an automated process could establish whether or not you wanted
> to allow multiple instances of a certain element when only one instance is
> present in your document.  Also,  enumerations for attribute values are
> impossible for an automated process to properly declare.  If your source
> XML
> document has a structure like this:
> 
> <price currency="USD"/>
> 
> All it could determine is the present value and write out a DTD
> declaration
> like such:
> 
> <!ELEMENT price (#PCDATA)>
> <!ATTLIST price currency CDATA #REQUIRED>
> 
> It cannot write out whether the value for "currency" is #REQUIRED or
> #IMPLIED or #FIXED.  It also could not tell you that additional values are
> allowed, what the dafault should be and that only those values are allowed
> like this:
> 
> <!ATTLIST price currency (USD | CAD | AUS) "USD" #REQUIRED>
> 
> Best advice: text editor + old school methods
> 
> ;-)
> 
> Cheers
> 
> Duane Nickull
> CTO, XML Global Technologies
> http://www.xmlglobal.com
> 
> 
> ------------------------------------------------------------------
> The xml-dev list is sponsored by XML.org, an initiative of OASIS
> <http://www.oasis-open.org>
> 
> The list archives are at http://lists.xml.org/archives/xml-dev/
> 
> To unsubscribe from this elist send a message with the single word
> "unsubscribe" in the body to: xml-dev-request@lists.xml.org
>