Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > DTD generation from XML Schema

Reply
Thread Tools

DTD generation from XML Schema

 
 
Rob Exley
Guest
Posts: n/a
 
      01-26-2004
I think this is a sensible question but am happy to be pointed out the
error of my ways.

I am specifying a new product for which I would like to have an XML
Schema interface (not sure whether W3C or Relax NG as yet). I would
also like to have a DTD that describes the same interface for those
clients who are unable to use Schemas for one reason or another. Is it
possible to generate a DTD from a given Schema ? I can seem to find
lots of things about specific tools generating DTD's and Schemas from
a given XML document.

However logically I would like to maintain one schema for which I can
then generate an equally valid DTD and also example XML documents.

BTW: I would ideally like this to be possible from either command line
such that it can be hooked into the build process or from some kind of
Emacs mode ?

Appreciate any help in advance.....

--
Rob Exley
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      01-26-2004


Rob Exley wrote:

> I think this is a sensible question but am happy to be pointed out the
> error of my ways.
>
> I am specifying a new product for which I would like to have an XML
> Schema interface (not sure whether W3C or Relax NG as yet). I would
> also like to have a DTD that describes the same interface for those
> clients who are unable to use Schemas for one reason or another. Is it
> possible to generate a DTD from a given Schema ? I can seem to find
> lots of things about specific tools generating DTD's and Schemas from
> a given XML document.
>
> However logically I would like to maintain one schema for which I can
> then generate an equally valid DTD and also example XML documents.


I am not going to say that it is not solvable but at least a W3C XML
schema can specify/constrain a lot of things a DTD can't do, for
instance if you use some regular expression pattern to restrict the
value of an element or attribute how would you want to express that in a
DTD?
--

Martin Honnen
http://JavaScript.FAQTs.com/

 
Reply With Quote
 
 
 
 
Rob Exley
Guest
Posts: n/a
 
      01-26-2004
Martin Honnen <> wrote in message news:<>...
> Rob Exley wrote:
>
> > I think this is a sensible question but am happy to be pointed out the
> > error of my ways.
> >
> > I am specifying a new product for which I would like to have an XML
> > Schema interface (not sure whether W3C or Relax NG as yet). I would
> > also like to have a DTD that describes the same interface for those
> > clients who are unable to use Schemas for one reason or another. Is it
> > possible to generate a DTD from a given Schema ? I can seem to find
> > lots of things about specific tools generating DTD's and Schemas from
> > a given XML document.
> >
> > However logically I would like to maintain one schema for which I can
> > then generate an equally valid DTD and also example XML documents.

>
> I am not going to say that it is not solvable but at least a W3C XML
> schema can specify/constrain a lot of things a DTD can't do, for
> instance if you use some regular expression pattern to restrict the
> value of an element or attribute how would you want to express that in a
> DTD?


I am happy to lose validation information that I have no way to
specify in the DTD as long as the structure and relationships
cardinality etc are maintained. I appreciate that using schemas I can
provide a lot better validation for any documents using the schema.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
New to xml schema - does the dtd/schema validation happens always ? pramodr XML 3 04-05-2009 12:10 PM
web.xml / XML schema issue, why do some XML schema attributes disappear asciz@starmail.com Java 3 02-20-2007 09:56 AM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
Validating XML against a DTD that is not supplied in the XML Schema Ben Jessel Java 0 08-05-2004 11:45 AM
ANN: Syntext Dtd2Xs v1.3 - Complex&Modularized XML DTD to XML Schema Converter Syntext, Inc XML 0 08-21-2003 10:50 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57