File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes XSD or DTD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XSD or DTD" Watch "XSD or DTD" New topic


A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 980

I was just looking at the resources folder of Springframework distribution zip file...and i found both DTD's and XSD schema files...

So when do one go for Schema / DTD..?

What are the factors that one needs to take into account while deciding??

A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 980
Any suggestions
sachin poddar

Joined: Feb 10, 2006
Posts: 17
i have no idea about Springframework but here is quik diff between XML Schemas and DTDs
1. XML Schemas use XML document syntax. Declarations can have richer and more complex internal structures than declarations in DTD. XML Schemas are pure XML documents, DTDs have several limitations.
2. XML Schemas provide data-oriented data types in addition to the more document-oriented data types XML 1.0 DTDs support.
3. XML Schemas support namespaces.

I would suggest, go for XML Schema
[ May 09, 2007: Message edited by: sachin poddar ]

Sachin. [SCJP 1.4, SCWCD 5]
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 980
Thanks Sachin!!
It is sorta covered in the JavaRanch Style Guide.
subject: XSD or DTD
It's not a secret anymore!