Download presentation
Presentation is loading. Please wait.
Published byEustace Melton Modified over 9 years ago
1
XML DTD and XML Schema Discussion Sessions 1A and 1B Session 2
2
XML eXtensible Markup Language Colossus of Rhodes Greece 107 Great Pyramid of Giza Egypt 147
3
DTD Document Type Definition Meaning of *, +, and ? #PCDATA and CDATA Order of elements and attributes #REQUIRED and #IMPLIED
4
DTD Document Type Definition What about an empty element? Can we define an unsorted list of elements? An element with anything? Attributes with choices? Why to use attribute IDs? IDREF(S)?
5
DTD Document Type Definition Pros Compact structure Can be defined inline Wide support among parsers Cons Are not written in XML Don’t support Namespaces Don’t have data – typing Have limited capacity for counters
6
XML Schema Types of elements Simple type Complex type
7
XML Schema Simple Type Egypt Different ways to define this element: <xs:element name=”location" type="xs:string" /> <xs:element name="location" type="stringType" />...
8
XML Schema Complex Type Complex type Text + Attributes Elements + Attributes Attributes only Text + Elements + Attributes
9
XML Schema Complex Type: Simple Content 100 Just to generate this simple line!
10
XML Schema Complex Type: Complex Content 1 <xs:element name="wonder" type="wonderType" minOccurs="2" maxOccurs="unbounded"/> What does this segment of code do?
11
XML Schema Complex Type: Complex Content 2 <xs:attribute name="source" default="ancient.jpg" type="xs:string"/> An empty element that contains only attributes
12
XML Schema Complex Type: Complex Content 3 A mixed element that combines children elements, text, and attributes
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.