SlideShare a Scribd company logo
2
Most read
Difference between DTD and XSD

     S.No   DTD                                XSD

     1      Abbreviation:                      Abbreviation:

            DTD stands for Document Type XSD stands             for   Xml     Schema
            Definition                   Definition

     2      Markup validation:                 Markup validation:

            Can specify only the root element Any global element can be root. No
            in the instance document. No ambiguous content support.
            ambiguous content support.

     3      Namespace support :                Namespace support :

            DTD does not support namespace XSD uses its own set of namespaces
            instead it has its own set of and elements for defining the schema.
            keywords for defining a schema

            example:
            !DOCTYPE for root tag
            !ELEMENT for an element
            !ATTLIST for an attribute
            !ENTITY for defining variables.

     4      Code reuse:                        Code reuse:

            Poorly supported.      Can     use Can reuse definitions using named
            parameter entities.                types.

     5      Datatype Support :                  Datatype Support :

            No real datatype support. DTD Provides flexible set of datatypes.
            has only #PCDATA as the data
            type for the elements.(it is used 1. primitive / fundamental data types:
            for string datatype)              string,decimal,float,boolean
                                              2. Custom Data types
                                              i. complex type : a data type that
                                              contains child elements or attributes
                                              and
                                              also the mixed contents
                                              ii. simple type : a data type that
                                              contains only values.

                                               Provides multi-field key cross
                                               references.  No      co-occurrence
                                               constraints.

     6      Datatype Validation:               Datatype Validation:

            In DTD, no such restrictions       XSD allows us to specify restriction
on data .

                                                 Example: <price></price> tag. we can
                                                 write only digits here.

      7      Uses:                               Uses:

             DTD is more suitable for small XSD is used in large XML Data ex:
             XML                       Data ADO.NET DataSets, Web Services.
             ex:bookname,companyname etc.

      8      Strongly / Weakly typed:            Strongly / Weakly typed:

             DTD is weaky typed.                 XML Schema is strongly typed.

             DTD       lacks   strong  typing    An XML Schema can define the data
             capabilities, and has no way of     type of certain elements, and even
             validating the content to data      constrain it to within specific lengths
             types.                              or values. This ability ensures that the
                                                 data stored in the XML document is
                                                 accurate.

      9      Provisions of Inline Definitions:   Provisions of Inline Definitions:

             DTD allows inline definitions.      XML Schema does not allow inline
                                                 definitions
             This is good when working with
             small files, as it allows us to
             contain both the content and the
             schema within the same
             document, but when it comes to
             larger documents, this can be a
             disadvantage, as we pull content
             every time we retrieve the
             schema. This can lead to serious
             overhead that can degrade
             performance.


And, further updates on difference between questions and answers, please visit my blog @
http://onlydifferencefaqs.blogspot.in/

More Related Content

PPTX
Unit 1-Data Science Process Overview.pptx
PPT
ADO .Net
PDF
Cloud Mashup
PPTX
R Graphical User Interface Comparison.pptx
PPTX
Recognition-of-tokens
PPTX
Control Strategies in AI
PPTX
Data warehouse and data mining
PPTX
Non relational databases-no sql
Unit 1-Data Science Process Overview.pptx
ADO .Net
Cloud Mashup
R Graphical User Interface Comparison.pptx
Recognition-of-tokens
Control Strategies in AI
Data warehouse and data mining
Non relational databases-no sql

What's hot (20)

PPTX
Input of graphical data
PPT
XML Schema
PPTX
Turing machine
PPTX
States, state graphs and transition testing
PDF
Multimedia cloud computing
PPTX
Hadoop Architecture
PPTX
File Management in Operating System
PDF
Android intents
PPTX
Structure of agents
PDF
Ai lab manual
PPTX
Lecture 06 production system
PPT
Introduction to Expert Systems {Artificial Intelligence}
PDF
JavaScript - Chapter 12 - Document Object Model
PPTX
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
PPTX
Deductive databases
PPT
Analysis modeling in software engineering
PPTX
DBMS - RAID
PPTX
search strategies in artificial intelligence
PPTX
Data science unit1
Input of graphical data
XML Schema
Turing machine
States, state graphs and transition testing
Multimedia cloud computing
Hadoop Architecture
File Management in Operating System
Android intents
Structure of agents
Ai lab manual
Lecture 06 production system
Introduction to Expert Systems {Artificial Intelligence}
JavaScript - Chapter 12 - Document Object Model
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Deductive databases
Analysis modeling in software engineering
DBMS - RAID
search strategies in artificial intelligence
Data science unit1
Ad

Viewers also liked (20)

PPT
XML and DTD
PPTX
XML, DTD & XSD Overview
PPTX
To try and create DTD and XML Schema
PDF
HTML and XML Difference FAQs
PPTX
Tablas html
PPTX
Document type definition
PPTX
HTML Link - Image - Comments
PPT
Hyperlinks in HTML
PPTX
XML Document Object Model (DOM)
PPSX
CSS-Cascading Style Sheets - Introduction
PPT
2 dtd - validating xml documents
PDF
Html table tags
PPT
Markup Languages
PPT
How Cascading Style Sheets (CSS) Works
PPTX
Images and Lists in HTML
PPT
Css Ppt
PPT
Introduction to Cascading Style Sheets (CSS)
PPT
Introduction to CSS
PPT
cascading style sheet ppt
PPS
Documentation Types
XML and DTD
XML, DTD & XSD Overview
To try and create DTD and XML Schema
HTML and XML Difference FAQs
Tablas html
Document type definition
HTML Link - Image - Comments
Hyperlinks in HTML
XML Document Object Model (DOM)
CSS-Cascading Style Sheets - Introduction
2 dtd - validating xml documents
Html table tags
Markup Languages
How Cascading Style Sheets (CSS) Works
Images and Lists in HTML
Css Ppt
Introduction to Cascading Style Sheets (CSS)
Introduction to CSS
cascading style sheet ppt
Documentation Types
Ad

Similar to Difference between dtd and xsd (20)

PPTX
DOC-20241022-WA0000[1] - Read-Only.pptx
PPTX
XML Schema.pptx
PPTX
XSD Schema Presentation on basic of the schema
PPTX
DTD1.pptx
PPTX
Applied xml programming for microsoft 3
DOCX
Bt0078
PDF
XML Bible
DOCX
Xml viva questions
DOCX
Oracle soa xml faq
PDF
Web Technologies Unit 2 Print.pdf
PPT
XML Validations.ppt
PPTX
distributed system concerned lab sessions
PDF
II UNIT PPT NOTES.pdf this is the data structures
PPTX
PPTX
Xml schema
PDF
Enhanced xml validation using srml01
PPT
Xml by Luqman
PPT
Intro to xml
PPT
Extensible and Dynamic Topic Types For DDS (out of date)
PDF
Dotnet differences compiled -1
DOC-20241022-WA0000[1] - Read-Only.pptx
XML Schema.pptx
XSD Schema Presentation on basic of the schema
DTD1.pptx
Applied xml programming for microsoft 3
Bt0078
XML Bible
Xml viva questions
Oracle soa xml faq
Web Technologies Unit 2 Print.pdf
XML Validations.ppt
distributed system concerned lab sessions
II UNIT PPT NOTES.pdf this is the data structures
Xml schema
Enhanced xml validation using srml01
Xml by Luqman
Intro to xml
Extensible and Dynamic Topic Types For DDS (out of date)
Dotnet differences compiled -1

More from Umar Ali (20)

PDF
Difference between wcf and asp.net web api
PDF
Difference between ActionResult() and ViewResult()
PDF
Difference between asp.net mvc 3 and asp.net mvc 4
PDF
Difference between asp.net web api and asp.net mvc
PDF
Difference between asp.net web forms and asp.net mvc
PDF
ASP.NET MVC difference between questions list 1
ODT
Link checkers 1
PDF
Affiliate Networks Sites-1
PDF
Technical Video Training Sites- 1
PDF
US News Sites- 1
PDF
How to create user friendly file hosting link sites
PDF
Weak hadiths in tamil
PDF
Bulughul Maram in tamil
PDF
Asp.net website usage and job trends
PDF
Indian news sites- 1
PDF
Photo sharing sites- 1
PDF
File hosting search engines
PDF
Ajax difference faqs compiled- 1
PDF
ADO.NET difference faqs compiled- 1
PDF
.NET Differences List
Difference between wcf and asp.net web api
Difference between ActionResult() and ViewResult()
Difference between asp.net mvc 3 and asp.net mvc 4
Difference between asp.net web api and asp.net mvc
Difference between asp.net web forms and asp.net mvc
ASP.NET MVC difference between questions list 1
Link checkers 1
Affiliate Networks Sites-1
Technical Video Training Sites- 1
US News Sites- 1
How to create user friendly file hosting link sites
Weak hadiths in tamil
Bulughul Maram in tamil
Asp.net website usage and job trends
Indian news sites- 1
Photo sharing sites- 1
File hosting search engines
Ajax difference faqs compiled- 1
ADO.NET difference faqs compiled- 1
.NET Differences List

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Encapsulation theory and applications.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
cuic standard and advanced reporting.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
KodekX | Application Modernization Development
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Approach and Philosophy of On baking technology
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
Dropbox Q2 2025 Financial Results & Investor Presentation
Reach Out and Touch Someone: Haptics and Empathic Computing
Encapsulation theory and applications.pdf
Programs and apps: productivity, graphics, security and other tools
cuic standard and advanced reporting.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Building Integrated photovoltaic BIPV_UPV.pdf
MIND Revenue Release Quarter 2 2025 Press Release
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
KodekX | Application Modernization Development
Agricultural_Statistics_at_a_Glance_2022_0.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Approach and Philosophy of On baking technology
Big Data Technologies - Introduction.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Per capita expenditure prediction using model stacking based on satellite ima...

Difference between dtd and xsd

  • 1. Difference between DTD and XSD S.No DTD XSD 1 Abbreviation: Abbreviation: DTD stands for Document Type XSD stands for Xml Schema Definition Definition 2 Markup validation: Markup validation: Can specify only the root element Any global element can be root. No in the instance document. No ambiguous content support. ambiguous content support. 3 Namespace support : Namespace support : DTD does not support namespace XSD uses its own set of namespaces instead it has its own set of and elements for defining the schema. keywords for defining a schema example: !DOCTYPE for root tag !ELEMENT for an element !ATTLIST for an attribute !ENTITY for defining variables. 4 Code reuse: Code reuse: Poorly supported. Can use Can reuse definitions using named parameter entities. types. 5 Datatype Support : Datatype Support : No real datatype support. DTD Provides flexible set of datatypes. has only #PCDATA as the data type for the elements.(it is used 1. primitive / fundamental data types: for string datatype) string,decimal,float,boolean 2. Custom Data types i. complex type : a data type that contains child elements or attributes and also the mixed contents ii. simple type : a data type that contains only values. Provides multi-field key cross references. No co-occurrence constraints. 6 Datatype Validation: Datatype Validation: In DTD, no such restrictions XSD allows us to specify restriction
  • 2. on data . Example: <price></price> tag. we can write only digits here. 7 Uses: Uses: DTD is more suitable for small XSD is used in large XML Data ex: XML Data ADO.NET DataSets, Web Services. ex:bookname,companyname etc. 8 Strongly / Weakly typed: Strongly / Weakly typed: DTD is weaky typed. XML Schema is strongly typed. DTD lacks strong typing An XML Schema can define the data capabilities, and has no way of type of certain elements, and even validating the content to data constrain it to within specific lengths types. or values. This ability ensures that the data stored in the XML document is accurate. 9 Provisions of Inline Definitions: Provisions of Inline Definitions: DTD allows inline definitions. XML Schema does not allow inline definitions This is good when working with small files, as it allows us to contain both the content and the schema within the same document, but when it comes to larger documents, this can be a disadvantage, as we pull content every time we retrieve the schema. This can lead to serious overhead that can degrade performance. And, further updates on difference between questions and answers, please visit my blog @ http://onlydifferencefaqs.blogspot.in/