Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 381449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:05:12+00:00 2026-05-12T15:05:12+00:00

What are the pros / cons in DTD and XML Schemas (I’m not even

  • 0

What are the pros / cons in DTD and XML Schemas (I’m not even sure what the official name of the latter is!)? Which is better? Why do we need two ways to do the same thing?

Edit: I found this in an article I was reading, which is what prompted me to ask the question:

Why W3C XML Schema Language?

The W3C XML Schema Language is not the
only schema language. In fact, the XML
specification describes document-type
definitions (DTDs) as the way to
express a schema. In addition,
pre-release versions of the JAXB
Reference Implementation worked only
with DTDs — that is, not with schemas
written in the XML Schema Language.
However, the XML Schema Language is
much richer than DTDs. For example,
schemas written in the XML Schema
Language can describe structural
relationships and data types that
can’t be expressed (or can’t easily be
expressed) in DTDs. There are tools
available to convert DTDs to the W3C
XML Schema Language, so if you have
DTD-based schemas that you used with
an earlier version of the JAXB
Reference Implementation, you can use
these tools to convert the schemas to
XML Schema Language. http://java.sun.com/developer/technicalArticles/WebServices/jaxb/#binsch

I guess I would like examples that illustrate why XML-Schema is better (if it indeed is).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T15:05:12+00:00Added an answer on May 12, 2026 at 3:05 pm

    From http://weblogs.asp.net/rchartier/archive/2006/03/21/440782.aspx

    • DTD’s are not namespace aware.

    • DTD’s have #define, #include, and #ifdef — or, less C-oriented, the ability to define shorthand abbreviations, external
      content, and some conditional parsing.

    • A DTD describes the entire XML document (even if it leaves “holes”); a schema can define portions.

    • XSD has a type system.

    • XSD has a much richer language for describing what element or attribute content “looks like.” This is related to the type
      system.

    • You can put a DTD inline into an XML document, you cannot do this with XSD. This means DTD’s are more secure (you only
      have to protect one bytestream — the xml/dtd — and not
      multiple).

    • The official definition of “valid XML” requires a DTD. Since this may be impractical, if not impossible, you often have to
      settle for schema-valid, which is not quite the same.

    For my part, it’s pretty straightforward to write a validator for some XML if you have an XSD. I haven’t seen this with a DTD, although I’m sure it exists.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What are the pros/cons of using the GIT as opposed to CoMarshalInterThreadInterfaceInStream and CoGetInterfaceAndReleaseStream
What are some pros/cons for using the Reflection.Emit library versus CodeDOM for dynamically generating
TLDR: What are the pros/cons of using an in-memory database vs locks and concurrent
Are there any pros/cons of using the following two alternatives in your action signature:
This is more a question of pros/cons between PHP and JAVA. Iv been doing
Is it good to use float in table less design? What is the pros/cons
What's the pros and cons of using a Model-View-Controller model in building your application?
What are the pros and cons of using Qt containers ( QMap , QVector
What's the pros and cons for each of them?
What are the pros and cons of using either of the following approaches to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.