SlideShare a Scribd company logo
XML Key Components
DTD
Prepared By:
 Rajan Shah
XML- eXtensible Mark-up Language
 Xml provides data storage and transportation facility.
 In xml there are no predefined tags. All the tags are
user-defined.
 It is a language which describes other languages
Advantages of XML
 It is readable by both- humans and machines
 It is self documenting
 Independent of OS
 Used to display meta contents
 Useful in exchanging data between applications
 Neutral language
KEY components
 Elements
 Attributes
 Other essentials
 Namespaces
Elements
 Elements must have a
closing tag
 Tags are case sensitive
 Elements must be
correctly nested
 Must have root element
 < b >< i > Hello </ b ></
i > -- Is not correct
 < br >-- used alone is not
allowed. It must be
closed
Attributes
 Attribute values must
be quoted to be
considered legal in
xml
 <attrib-name
value=“xyz”>Hello </
attrib-name > -- is
valid.
Other Essentials
 White spaces are not trimmed to a single space
 Carriage return(CR) and linefeed(LF)
combination at the end of text lines, is translated
to Lf by xml
Namespaces
 It is possible to associate a namespace with element to
distinguish them from other similar named elements in
other projects, when sharing two or more documents
 Usually takes the form of a url, beginning with a
domain name, an optional namespace label in the form
of a directory and finally a version no.(optional)
 Example: xmlns: “http://www.domain.com/ns/1.1”
DTD- Document Type Data
 Dtd is used to define the basic building blocks of any
XML document.
 It is used to specify the sequence of elements and what
data to be parsed and what not.
 It is used to specify the set of rules for structuring data
in XML File.
Example of DTD
 memo.dtd (External DTD File)
<!ELEMENT memo (to, from, message)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT message (#PCDATA)>
Continue
 readmemo.xml
<?xml version=“1.1”?>
<!DOCTYPE memo SYSTEM memo.dtd>
<memo>
<to>XYZ</to>
<from>ABC</from>
<message>Hello</message>
</memo>
Understanding DTD File
 Document of type “memo” is created, having 3
elements– to, from, message, each having data type
PCDATA- parsed character data, which refers to
everything except mark-up
 DTD describes XML in terms of elements, tags,
attributes, entities, PCDATA and CDATA.
Advantages of DTD
 Advantages:
1. Used to define the structural components of XML
document
2. Simple and Compact
3. Can be Embedded directly inn XML document
Disadvantages
 Disadvantages:
1. Cant define the type of DATA contained in XML
document
2. DTD’s are not aware of the concept of Namespace
3. DTD’s are not W3C recommendation.
Xml dtd- Document Type Definition- Web Technology

More Related Content

What's hot

WSDL
WSDLWSDL
Jsp ppt
Jsp pptJsp ppt
Jsp ppt
Vikas Jagtap
 
Xml
XmlXml
01 xml document structure
01 xml document structure01 xml document structure
01 xml document structure
Baskarkncet
 
DTD
DTDDTD
Variables in C++, data types in c++
Variables in C++, data types in c++Variables in C++, data types in c++
Variables in C++, data types in c++
Neeru Mittal
 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01
Hatem Mahmoud
 
HTML-(workshop)7557.pptx
HTML-(workshop)7557.pptxHTML-(workshop)7557.pptx
HTML-(workshop)7557.pptx
Raja980775
 
Images and Tables in HTML
Images and Tables in HTMLImages and Tables in HTML
Images and Tables in HTML
Aarti P
 
HTML: Tables and Forms
HTML: Tables and FormsHTML: Tables and Forms
HTML: Tables and Forms
BG Java EE Course
 
Fragmentation and types of fragmentation in Distributed Database
Fragmentation and types of fragmentation in Distributed DatabaseFragmentation and types of fragmentation in Distributed Database
Fragmentation and types of fragmentation in Distributed Database
Abhilasha Lahigude
 
Servlet life cycle
Servlet life cycleServlet life cycle
Servlet life cycle
Venkateswara Rao N
 
Object oriented database
Object oriented databaseObject oriented database
Object oriented database
Md. Hasan Imam Bijoy
 
Hypermedia messageing (UNIT 5)
Hypermedia messageing (UNIT 5)Hypermedia messageing (UNIT 5)
Hypermedia messageing (UNIT 5)
nirmalbj
 
Eye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easilyEye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easily
shabab shihan
 
Xml schema
Xml schemaXml schema
Xml schema
Prabhakaran V M
 
Xml dtd
Xml dtdXml dtd
Xml dtd
sana mateen
 
Tags in html
Tags in htmlTags in html
Event handling
Event handlingEvent handling
Event handling
swapnac12
 
Html basic tags
Html basic tagsHtml basic tags
Html basic tags
umesh patil
 

What's hot (20)

WSDL
WSDLWSDL
WSDL
 
Jsp ppt
Jsp pptJsp ppt
Jsp ppt
 
Xml
XmlXml
Xml
 
01 xml document structure
01 xml document structure01 xml document structure
01 xml document structure
 
DTD
DTDDTD
DTD
 
Variables in C++, data types in c++
Variables in C++, data types in c++Variables in C++, data types in c++
Variables in C++, data types in c++
 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01
 
HTML-(workshop)7557.pptx
HTML-(workshop)7557.pptxHTML-(workshop)7557.pptx
HTML-(workshop)7557.pptx
 
Images and Tables in HTML
Images and Tables in HTMLImages and Tables in HTML
Images and Tables in HTML
 
HTML: Tables and Forms
HTML: Tables and FormsHTML: Tables and Forms
HTML: Tables and Forms
 
Fragmentation and types of fragmentation in Distributed Database
Fragmentation and types of fragmentation in Distributed DatabaseFragmentation and types of fragmentation in Distributed Database
Fragmentation and types of fragmentation in Distributed Database
 
Servlet life cycle
Servlet life cycleServlet life cycle
Servlet life cycle
 
Object oriented database
Object oriented databaseObject oriented database
Object oriented database
 
Hypermedia messageing (UNIT 5)
Hypermedia messageing (UNIT 5)Hypermedia messageing (UNIT 5)
Hypermedia messageing (UNIT 5)
 
Eye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easilyEye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easily
 
Xml schema
Xml schemaXml schema
Xml schema
 
Xml dtd
Xml dtdXml dtd
Xml dtd
 
Tags in html
Tags in htmlTags in html
Tags in html
 
Event handling
Event handlingEvent handling
Event handling
 
Html basic tags
Html basic tagsHtml basic tags
Html basic tags
 

Similar to Xml dtd- Document Type Definition- Web Technology

XML-Unit 1.ppt
XML-Unit 1.pptXML-Unit 1.ppt
XML-Unit 1.ppt
ssuseree7dcd
 
Xml schema
Xml schemaXml schema
Xml schema
Akshaya Akshaya
 
Intro to xml
Intro to xmlIntro to xml
Intro to xml
Tarun Jain
 
distributed system concerned lab sessions
distributed system concerned lab sessionsdistributed system concerned lab sessions
distributed system concerned lab sessions
milkesa13
 
eXtensible Markup Language (By Dr.Hatem Mohamed)
eXtensible Markup Language (By Dr.Hatem Mohamed)eXtensible Markup Language (By Dr.Hatem Mohamed)
eXtensible Markup Language (By Dr.Hatem Mohamed)
MUFIX Community
 
XML Presentation-2
XML Presentation-2XML Presentation-2
XML Presentation-2
Sudharsan S
 
Sgml and xml
Sgml and xmlSgml and xml
Sgml and xml
Jaya Kumari
 
Xml and DTD's
Xml and DTD'sXml and DTD's
Xml and DTD's
Swati Parmar
 
Xml by Luqman
Xml by LuqmanXml by Luqman
Xml by Luqman
Luqman Shareef
 
Xml 1
Xml 1Xml 1
Xml
XmlXml
Xml
soumya
 
Unit 5 xml (1)
Unit 5   xml (1)Unit 5   xml (1)
Unit 5 xml (1)
manochitra10
 
XML External Entity (XXE)
XML External Entity (XXE)XML External Entity (XXE)
XML External Entity (XXE)
Jay Thakker
 
WEB PROGRAMMING
WEB PROGRAMMINGWEB PROGRAMMING
WEB PROGRAMMING
sweetysweety8
 
Xml and Co.
Xml and Co.Xml and Co.
Xml and Co.
Findik Dervis
 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
Bikash chhetri
 
Xml sasidhar
Xml  sasidharXml  sasidhar
Xml sasidhar
Sasidhar Kothuru
 
XML
XMLXML
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
M.FLORENCE DAYANA WEB DESIGN -Unit 5   XMLM.FLORENCE DAYANA WEB DESIGN -Unit 5   XML
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
Dr.Florence Dayana
 
XML/XSLT
XML/XSLTXML/XSLT
XML/XSLT
thinkahead.net
 

Similar to Xml dtd- Document Type Definition- Web Technology (20)

XML-Unit 1.ppt
XML-Unit 1.pptXML-Unit 1.ppt
XML-Unit 1.ppt
 
Xml schema
Xml schemaXml schema
Xml schema
 
Intro to xml
Intro to xmlIntro to xml
Intro to xml
 
distributed system concerned lab sessions
distributed system concerned lab sessionsdistributed system concerned lab sessions
distributed system concerned lab sessions
 
eXtensible Markup Language (By Dr.Hatem Mohamed)
eXtensible Markup Language (By Dr.Hatem Mohamed)eXtensible Markup Language (By Dr.Hatem Mohamed)
eXtensible Markup Language (By Dr.Hatem Mohamed)
 
XML Presentation-2
XML Presentation-2XML Presentation-2
XML Presentation-2
 
Sgml and xml
Sgml and xmlSgml and xml
Sgml and xml
 
Xml and DTD's
Xml and DTD'sXml and DTD's
Xml and DTD's
 
Xml by Luqman
Xml by LuqmanXml by Luqman
Xml by Luqman
 
Xml 1
Xml 1Xml 1
Xml 1
 
Xml
XmlXml
Xml
 
Unit 5 xml (1)
Unit 5   xml (1)Unit 5   xml (1)
Unit 5 xml (1)
 
XML External Entity (XXE)
XML External Entity (XXE)XML External Entity (XXE)
XML External Entity (XXE)
 
WEB PROGRAMMING
WEB PROGRAMMINGWEB PROGRAMMING
WEB PROGRAMMING
 
Xml and Co.
Xml and Co.Xml and Co.
Xml and Co.
 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
 
Xml sasidhar
Xml  sasidharXml  sasidhar
Xml sasidhar
 
XML
XMLXML
XML
 
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
M.FLORENCE DAYANA WEB DESIGN -Unit 5   XMLM.FLORENCE DAYANA WEB DESIGN -Unit 5   XML
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
 
XML/XSLT
XML/XSLTXML/XSLT
XML/XSLT
 

More from Rajan Shah

Timing and control circuit
Timing and control circuitTiming and control circuit
Timing and control circuit
Rajan Shah
 
Rethrowing exception- JAVA
Rethrowing exception- JAVARethrowing exception- JAVA
Rethrowing exception- JAVA
Rajan Shah
 
Np Completeness
Np CompletenessNp Completeness
Np Completeness
Rajan Shah
 
Lex Tool
Lex ToolLex Tool
Lex Tool
Rajan Shah
 
Files and streams In Java
Files and streams In JavaFiles and streams In Java
Files and streams In Java
Rajan Shah
 
Deadlock- Operating System
Deadlock- Operating SystemDeadlock- Operating System
Deadlock- Operating System
Rajan Shah
 
Data Reduction
Data ReductionData Reduction
Data Reduction
Rajan Shah
 
Cyclic Redundancy Check
Cyclic Redundancy CheckCyclic Redundancy Check
Cyclic Redundancy Check
Rajan Shah
 
Client server s/w Engineering
Client server s/w EngineeringClient server s/w Engineering
Client server s/w Engineering
Rajan Shah
 
Bluetooth protocol
Bluetooth protocolBluetooth protocol
Bluetooth protocol
Rajan Shah
 

More from Rajan Shah (10)

Timing and control circuit
Timing and control circuitTiming and control circuit
Timing and control circuit
 
Rethrowing exception- JAVA
Rethrowing exception- JAVARethrowing exception- JAVA
Rethrowing exception- JAVA
 
Np Completeness
Np CompletenessNp Completeness
Np Completeness
 
Lex Tool
Lex ToolLex Tool
Lex Tool
 
Files and streams In Java
Files and streams In JavaFiles and streams In Java
Files and streams In Java
 
Deadlock- Operating System
Deadlock- Operating SystemDeadlock- Operating System
Deadlock- Operating System
 
Data Reduction
Data ReductionData Reduction
Data Reduction
 
Cyclic Redundancy Check
Cyclic Redundancy CheckCyclic Redundancy Check
Cyclic Redundancy Check
 
Client server s/w Engineering
Client server s/w EngineeringClient server s/w Engineering
Client server s/w Engineering
 
Bluetooth protocol
Bluetooth protocolBluetooth protocol
Bluetooth protocol
 

Recently uploaded

14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
Mukeshwaran Balu
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
nooriasukmaningtyas
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
ihlasbinance2003
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
Divyam548318
 

Recently uploaded (20)

14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
 

Xml dtd- Document Type Definition- Web Technology

  • 1. XML Key Components DTD Prepared By:  Rajan Shah
  • 2. XML- eXtensible Mark-up Language  Xml provides data storage and transportation facility.  In xml there are no predefined tags. All the tags are user-defined.  It is a language which describes other languages
  • 3. Advantages of XML  It is readable by both- humans and machines  It is self documenting  Independent of OS  Used to display meta contents  Useful in exchanging data between applications  Neutral language
  • 4. KEY components  Elements  Attributes  Other essentials  Namespaces
  • 5. Elements  Elements must have a closing tag  Tags are case sensitive  Elements must be correctly nested  Must have root element  < b >< i > Hello </ b ></ i > -- Is not correct  < br >-- used alone is not allowed. It must be closed
  • 6. Attributes  Attribute values must be quoted to be considered legal in xml  <attrib-name value=“xyz”>Hello </ attrib-name > -- is valid.
  • 7. Other Essentials  White spaces are not trimmed to a single space  Carriage return(CR) and linefeed(LF) combination at the end of text lines, is translated to Lf by xml
  • 8. Namespaces  It is possible to associate a namespace with element to distinguish them from other similar named elements in other projects, when sharing two or more documents  Usually takes the form of a url, beginning with a domain name, an optional namespace label in the form of a directory and finally a version no.(optional)  Example: xmlns: “http://www.domain.com/ns/1.1”
  • 9. DTD- Document Type Data  Dtd is used to define the basic building blocks of any XML document.  It is used to specify the sequence of elements and what data to be parsed and what not.  It is used to specify the set of rules for structuring data in XML File.
  • 10. Example of DTD  memo.dtd (External DTD File) <!ELEMENT memo (to, from, message)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT message (#PCDATA)>
  • 11. Continue  readmemo.xml <?xml version=“1.1”?> <!DOCTYPE memo SYSTEM memo.dtd> <memo> <to>XYZ</to> <from>ABC</from> <message>Hello</message> </memo>
  • 12. Understanding DTD File  Document of type “memo” is created, having 3 elements– to, from, message, each having data type PCDATA- parsed character data, which refers to everything except mark-up  DTD describes XML in terms of elements, tags, attributes, entities, PCDATA and CDATA.
  • 13. Advantages of DTD  Advantages: 1. Used to define the structural components of XML document 2. Simple and Compact 3. Can be Embedded directly inn XML document
  • 14. Disadvantages  Disadvantages: 1. Cant define the type of DATA contained in XML document 2. DTD’s are not aware of the concept of Namespace 3. DTD’s are not W3C recommendation.