SlideShare a Scribd company logo
1 of 8
1. Declaring elements
• XML document has number of elements.
• The first node of XML document is called
the root node.
Syntax: <!ELEMENT element-type category>
Ex: <!ELEMENT name(fname, lname)*>
Control characters
• Item*
• (item1,item2,item3)
• Item
• (item1,item2)
• (item1/item2)
• Item+
• Item?
• Appears zero or more times.
• Separates items in a sequence.
• Appears exactly once.
• Closes a group of items.
• Only one may appear.
• Appears at least once.
• Appears once or not at all.
Ex: <!ELEMENT recipe(name, ingredients+ ,cooking+ serves?, instruction*)>
2. DTD attributes
• Attributes are additional information
associated with an element type.
• ATTLIST is used to identify attributes for
elements.
• Syntax: <!ATTLIST element-name attribute-
name attribute-type default-value>
<element attribute-name=“attribute-value”>
• Ex:
<?xml version=“1.0”>
<!DOCTYPE image[
<!ELEMENT image EMPTY>
<!ATTLIST image height CDATA #REQUIRED>
<!ATTLIST image width CDATA #REQUIRED>
]>
<image height=“32” width=“32”>
3. DTD entities
• It is a symbolic representation of information.
• Mark up elements that contains complex data
are often referred as entities.
• Entities are variables used to define shortcuts
to text and special characters.
• They are internal and external.
1. Internal entity
• Refers to data that an XML processor has to
parse.
• Syntax: <!ENTITY name “entity value”>
Ex:
<?xml version=“1.0”>
<!DOCTYPE letter[
<!ENTITY hbd “happy birth day”>
]>
<letter> &hbd;</letter>
2. External entity
• Used for creating a common reference
that can be shared between multiple
documents.
• There are two types: private and public
• Syntax:
<!ENTITY name SYSTEM “URL/URI”>
<!ENTITY name PUBLIC “publicID” “URI”>

More Related Content

What's hot (8)

Xml session
Xml sessionXml session
Xml session
 
jQuery Selectors
jQuery SelectorsjQuery Selectors
jQuery Selectors
 
Groovy
GroovyGroovy
Groovy
 
Dictionary part 1
Dictionary part 1Dictionary part 1
Dictionary part 1
 
FFW Gabrovo PMG - jQuery
FFW Gabrovo PMG - jQueryFFW Gabrovo PMG - jQuery
FFW Gabrovo PMG - jQuery
 
FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1
 
Jquery
JqueryJquery
Jquery
 
Css selectors
Css selectorsCss selectors
Css selectors
 

Similar to DTD elements

Similar to DTD elements (7)

XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
 
Unit iv xml
Unit iv xmlUnit iv xml
Unit iv xml
 
html forms 2.pptx
html forms 2.pptxhtml forms 2.pptx
html forms 2.pptx
 
fundamentals of XML
fundamentals of XMLfundamentals of XML
fundamentals of XML
 
2-DTD.ppt
2-DTD.ppt2-DTD.ppt
2-DTD.ppt
 
DTD
DTDDTD
DTD
 
It8074 soa-unit i
It8074 soa-unit iIt8074 soa-unit i
It8074 soa-unit i
 

More from preetikapri1

types of testing in software engineering
types of testing in software engineering types of testing in software engineering
types of testing in software engineering preetikapri1
 
structures in C and Union in C, enumerated datatype
structures in C and Union in C, enumerated datatypestructures in C and Union in C, enumerated datatype
structures in C and Union in C, enumerated datatypepreetikapri1
 
bit wise operators and I/O operations in C
bit wise operators and I/O operations in Cbit wise operators and I/O operations in C
bit wise operators and I/O operations in Cpreetikapri1
 
consumer oriented applications
consumer oriented applicationsconsumer oriented applications
consumer oriented applicationspreetikapri1
 
architecture framework for ecommerce
architecture framework for ecommercearchitecture framework for ecommerce
architecture framework for ecommercepreetikapri1
 
impact of ecommerce on traditional means
impact of ecommerce on traditional means impact of ecommerce on traditional means
impact of ecommerce on traditional means preetikapri1
 
electronic data interchange
electronic data interchange electronic data interchange
electronic data interchange preetikapri1
 
consumer oriented applications
consumer oriented applicationsconsumer oriented applications
consumer oriented applicationspreetikapri1
 

More from preetikapri1 (20)

Forces
ForcesForces
Forces
 
software quality
software qualitysoftware quality
software quality
 
UML model
UML model UML model
UML model
 
Er diagrams
Er diagramsEr diagrams
Er diagrams
 
Data flow diagram
Data flow diagramData flow diagram
Data flow diagram
 
types of testing in software engineering
types of testing in software engineering types of testing in software engineering
types of testing in software engineering
 
structures in C and Union in C, enumerated datatype
structures in C and Union in C, enumerated datatypestructures in C and Union in C, enumerated datatype
structures in C and Union in C, enumerated datatype
 
bit wise operators and I/O operations in C
bit wise operators and I/O operations in Cbit wise operators and I/O operations in C
bit wise operators and I/O operations in C
 
Ms access
Ms access Ms access
Ms access
 
Functions
FunctionsFunctions
Functions
 
C programming
C programmingC programming
C programming
 
C preprocesor
C preprocesorC preprocesor
C preprocesor
 
Window object
Window objectWindow object
Window object
 
Html
HtmlHtml
Html
 
Css font
Css fontCss font
Css font
 
consumer oriented applications
consumer oriented applicationsconsumer oriented applications
consumer oriented applications
 
architecture framework for ecommerce
architecture framework for ecommercearchitecture framework for ecommerce
architecture framework for ecommerce
 
impact of ecommerce on traditional means
impact of ecommerce on traditional means impact of ecommerce on traditional means
impact of ecommerce on traditional means
 
electronic data interchange
electronic data interchange electronic data interchange
electronic data interchange
 
consumer oriented applications
consumer oriented applicationsconsumer oriented applications
consumer oriented applications
 

Recently uploaded

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 

Recently uploaded (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

DTD elements

  • 1.
  • 2. 1. Declaring elements • XML document has number of elements. • The first node of XML document is called the root node. Syntax: <!ELEMENT element-type category> Ex: <!ELEMENT name(fname, lname)*>
  • 3. Control characters • Item* • (item1,item2,item3) • Item • (item1,item2) • (item1/item2) • Item+ • Item? • Appears zero or more times. • Separates items in a sequence. • Appears exactly once. • Closes a group of items. • Only one may appear. • Appears at least once. • Appears once or not at all. Ex: <!ELEMENT recipe(name, ingredients+ ,cooking+ serves?, instruction*)>
  • 4. 2. DTD attributes • Attributes are additional information associated with an element type. • ATTLIST is used to identify attributes for elements. • Syntax: <!ATTLIST element-name attribute- name attribute-type default-value> <element attribute-name=“attribute-value”>
  • 5. • Ex: <?xml version=“1.0”> <!DOCTYPE image[ <!ELEMENT image EMPTY> <!ATTLIST image height CDATA #REQUIRED> <!ATTLIST image width CDATA #REQUIRED> ]> <image height=“32” width=“32”>
  • 6. 3. DTD entities • It is a symbolic representation of information. • Mark up elements that contains complex data are often referred as entities. • Entities are variables used to define shortcuts to text and special characters. • They are internal and external.
  • 7. 1. Internal entity • Refers to data that an XML processor has to parse. • Syntax: <!ENTITY name “entity value”> Ex: <?xml version=“1.0”> <!DOCTYPE letter[ <!ENTITY hbd “happy birth day”> ]> <letter> &hbd;</letter>
  • 8. 2. External entity • Used for creating a common reference that can be shared between multiple documents. • There are two types: private and public • Syntax: <!ENTITY name SYSTEM “URL/URI”> <!ENTITY name PUBLIC “publicID” “URI”>