[Home] [By Thread] [By Date] [Recent Entries]

  • From: Murali Krishna Banda <mbanda@s...>
  • To: "'xml-dev@l...'" <xml-dev@l...>
  • Date: Thu, 17 May 2001 19:19:48 +0530

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@x...]
> Sent: 	Thursday, May 17, 2001 3:15 PM
> To: 	Rob Lawson; xml-dev@l...
> 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@l...
> 

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member