[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: DTDs, W3C Schemas, RELAX NG, Schematron?
> Betty Harvey scripsit: > > > I personally believe that DTDs still have a future. 4 years ago they > > started chiselling the gravestone for DTD's and yet 4 years later new DTDs > > are still being developed and there is still controversy surrounding the > > various schema languages. Most commercial tools still support DTDs. > > Insofar as DTDs are used to describe content models and attribute information, > I agree. It is very slick to take a stand-alone DTD, convert it to RNG > with DTDinst (which carefully preserves readability), and then use Jing > to validate against incoming documents. What I think is also slick, is that having automatically converted your DTD to RELAX NG, you can then maintain it in RELAX NG, perhaps upgrading it to use datatypes, and then use Trang (http://www.thaiopensource.com/relaxng/trang.html) to convert it back to a DTD, with anything that DTDs cannot support being approximated as best as possible (i.e. typed data in content would turn back into PCDATA). Parameter entities, multiple files, comments etc are preserved through this roundtrip. Maintaining your DTDs in RELAX NG format has significant advantages. It's easy to write XSLT to do various sanity checks on your DTD or to do transformations safely and reliably (e.g. generating a version with element and attribute names in a different language). It's easy to generate nice documentation automatically. You can add structured documentation in XML into the schema so that your DTDs and documentation are generated from the same file. And, in the vaporware department, when I extend Trang to have an output module for XML Schema, you will be able to get an XML Schema for free too. If anybody is looking for a fun project, you might want to look at writing a program to generate an SVG diagram of a schema from RELAX NG. James
|
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
|