You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Barry, Gregory P." <Ba...@westinghouse.com> on 2008/04/17 16:49:10 UTC

DTD vs XSD?

Hi,

 

 I am developing on the windows platform using SAX and having the xml
files specify a DTD. However, Visual Studios as an XML designer that
works in XSD and not DTD. I am somewhat familiar with DTD but not so
much with XSD. If we go with the XSD approach, does this drastically
change the format/content of the xml files we are parsing. I am
developing a system that parses from another system and am setting up
the requirements for the other systems to use to be compliant with our
input.

 

Any quick thoughts or pointers are welcome, details are always welcomed
;-)

 

Thanks again,

 

  --Greg


RE: DTD vs XSD?

Posted by "Barry, Gregory P." <Ba...@westinghouse.com>.
Thanks very much for the info.

 

From: Jesse Pelton [mailto:jsp@PKC.com] 
Sent: Thursday, April 17, 2008 11:54 AM
To: c-dev@xerces.apache.org
Subject: RE: DTD vs XSD?

 

I don't think your SAX event handlers will need to change, but since I'm
parsing in an environment where performance is paramount and I have
stable document formats, I do my own validation in the handlers.

 

In other words, I don't really have a clue.

 

________________________________

From: Barry, Gregory P. [mailto:BarryGP@westinghouse.com] 
Sent: Thursday, April 17, 2008 11:45 AM
To: c-dev@xerces.apache.org
Subject: RE: DTD vs XSD?

Thanks. I guess my question is also, will my startElement(), etc. code
statements need to change if I go with XSD, or can I parse both DTD and
XSD using the same code.

 

 Thanks very much,

 

  --Greg

 

From: Jesse Pelton [mailto:jsp@PKC.com] 
Sent: Thursday, April 17, 2008 11:23 AM
To: c-dev@xerces.apache.org
Subject: RE: DTD vs XSD?

 

That's a big question you're asking! Both XSD and DTD describe allowed
document structure. Theory has it that anything that can be represented
in a DTD can be described by a schema as well. There are even tools that
convert DTD to XSD. Try a Google search for "dtd to schema."

 

XSD is considerably richer, so schemas can provide a stricter
definition. However, there's nothing that says you have to be strict;
it's up to you. But be warned, really understanding XML Schema is a
substantial undertaking. I'm a specification reader myself (see
http://www.w3.org/XML/Schema#dev), but there must be some decent books
out there.

 

________________________________

From: Barry, Gregory P. [mailto:BarryGP@westinghouse.com] 
Sent: Thursday, April 17, 2008 10:49 AM
To: c-dev@xerces.apache.org
Subject: DTD vs XSD?

Hi,

 

 I am developing on the windows platform using SAX and having the xml
files specify a DTD. However, Visual Studios as an XML designer that
works in XSD and not DTD. I am somewhat familiar with DTD but not so
much with XSD. If we go with the XSD approach, does this drastically
change the format/content of the xml files we are parsing. I am
developing a system that parses from another system and am setting up
the requirements for the other systems to use to be compliant with our
input.

 

Any quick thoughts or pointers are welcome, details are always welcomed
;-)

 

Thanks again,

 

  --Greg


RE: DTD vs XSD?

Posted by Jesse Pelton <js...@PKC.com>.
I don't think your SAX event handlers will need to change, but since I'm
parsing in an environment where performance is paramount and I have
stable document formats, I do my own validation in the handlers.
 
In other words, I don't really have a clue.

________________________________

From: Barry, Gregory P. [mailto:BarryGP@westinghouse.com] 
Sent: Thursday, April 17, 2008 11:45 AM
To: c-dev@xerces.apache.org
Subject: RE: DTD vs XSD?



Thanks. I guess my question is also, will my startElement(), etc. code
statements need to change if I go with XSD, or can I parse both DTD and
XSD using the same code.

 

 Thanks very much,

 

  --Greg

 

From: Jesse Pelton [mailto:jsp@PKC.com] 
Sent: Thursday, April 17, 2008 11:23 AM
To: c-dev@xerces.apache.org
Subject: RE: DTD vs XSD?

 

That's a big question you're asking! Both XSD and DTD describe allowed
document structure. Theory has it that anything that can be represented
in a DTD can be described by a schema as well. There are even tools that
convert DTD to XSD. Try a Google search for "dtd to schema."

 

XSD is considerably richer, so schemas can provide a stricter
definition. However, there's nothing that says you have to be strict;
it's up to you. But be warned, really understanding XML Schema is a
substantial undertaking. I'm a specification reader myself (see
http://www.w3.org/XML/Schema#dev), but there must be some decent books
out there.

 

________________________________

From: Barry, Gregory P. [mailto:BarryGP@westinghouse.com] 
Sent: Thursday, April 17, 2008 10:49 AM
To: c-dev@xerces.apache.org
Subject: DTD vs XSD?

Hi,

 

 I am developing on the windows platform using SAX and having the xml
files specify a DTD. However, Visual Studios as an XML designer that
works in XSD and not DTD. I am somewhat familiar with DTD but not so
much with XSD. If we go with the XSD approach, does this drastically
change the format/content of the xml files we are parsing. I am
developing a system that parses from another system and am setting up
the requirements for the other systems to use to be compliant with our
input.

 

Any quick thoughts or pointers are welcome, details are always welcomed
;-)

 

Thanks again,

 

  --Greg


RE: DTD vs XSD?

Posted by "Barry, Gregory P." <Ba...@westinghouse.com>.
Thanks. I guess my question is also, will my startElement(), etc. code
statements need to change if I go with XSD, or can I parse both DTD and
XSD using the same code.

 

 Thanks very much,

 

  --Greg

 

From: Jesse Pelton [mailto:jsp@PKC.com] 
Sent: Thursday, April 17, 2008 11:23 AM
To: c-dev@xerces.apache.org
Subject: RE: DTD vs XSD?

 

That's a big question you're asking! Both XSD and DTD describe allowed
document structure. Theory has it that anything that can be represented
in a DTD can be described by a schema as well. There are even tools that
convert DTD to XSD. Try a Google search for "dtd to schema."

 

XSD is considerably richer, so schemas can provide a stricter
definition. However, there's nothing that says you have to be strict;
it's up to you. But be warned, really understanding XML Schema is a
substantial undertaking. I'm a specification reader myself (see
http://www.w3.org/XML/Schema#dev), but there must be some decent books
out there.

 

________________________________

From: Barry, Gregory P. [mailto:BarryGP@westinghouse.com] 
Sent: Thursday, April 17, 2008 10:49 AM
To: c-dev@xerces.apache.org
Subject: DTD vs XSD?

Hi,

 

 I am developing on the windows platform using SAX and having the xml
files specify a DTD. However, Visual Studios as an XML designer that
works in XSD and not DTD. I am somewhat familiar with DTD but not so
much with XSD. If we go with the XSD approach, does this drastically
change the format/content of the xml files we are parsing. I am
developing a system that parses from another system and am setting up
the requirements for the other systems to use to be compliant with our
input.

 

Any quick thoughts or pointers are welcome, details are always welcomed
;-)

 

Thanks again,

 

  --Greg


RE: DTD vs XSD?

Posted by Jesse Pelton <js...@PKC.com>.
That's a big question you're asking! Both XSD and DTD describe allowed
document structure. Theory has it that anything that can be represented
in a DTD can be described by a schema as well. There are even tools that
convert DTD to XSD. Try a Google search for "dtd to schema."
 
XSD is considerably richer, so schemas can provide a stricter
definition. However, there's nothing that says you have to be strict;
it's up to you. But be warned, really understanding XML Schema is a
substantial undertaking. I'm a specification reader myself (see
http://www.w3.org/XML/Schema#dev), but there must be some decent books
out there.

________________________________

From: Barry, Gregory P. [mailto:BarryGP@westinghouse.com] 
Sent: Thursday, April 17, 2008 10:49 AM
To: c-dev@xerces.apache.org
Subject: DTD vs XSD?



Hi,

 

 I am developing on the windows platform using SAX and having the xml
files specify a DTD. However, Visual Studios as an XML designer that
works in XSD and not DTD. I am somewhat familiar with DTD but not so
much with XSD. If we go with the XSD approach, does this drastically
change the format/content of the xml files we are parsing. I am
developing a system that parses from another system and am setting up
the requirements for the other systems to use to be compliant with our
input.

 

Any quick thoughts or pointers are welcome, details are always welcomed
;-)

 

Thanks again,

 

  --Greg