Schema languages

839 views

Published on

Schema languages

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
839
On SlideShare
0
From Embeds
0
Number of Embeds
94
Actions
Shares
0
Downloads
59
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Schema languages

  1. 1. <?xml version=„1.0‟ encoding=“UTF-8”?><!-- Human Resource data--><HumanResource> <!-- Information for a person--> <Person id=„1‟ slary=“500”> <FirstName>John</FirstName> <MidName></MidName> <LastName>Doe</LastName> <Position>Manager</Position> </Person></HumanResource> Document Type
  2. 2. <?xml version=”1.0”?><name> <first> <!ELEMENT name (first, middle, last)> John </first> <!ELEMENT first (#PCDATA)> <middle> Johansen <!ELEMENT middle (#PCDATA)> </middle> <last> <!ELEMENT last (#PCDATA)> Doe </last></name>
  3. 3. <?xml version=”1.0”?><!DOCTYPE name [<!ELEMENT name (first, middle, last)><!ELEMENT first (#PCDATA)><!ELEMENT middle (#PCDATA)><!ELEMENT last (#PCDATA)>]><name> <first>John</first> <middle>Johansen</middle> <last>Doe</last></name>
  4. 4. <?xml version=”1.0”?><!DOCTYPE name SYSTEM “name.dtd”[]><name> <first>John</first> <middle>Johansen</middle> <last>Doe</last></name>
  5. 5. <!ELEMENT name (first, middle, last)>
  6. 6. <!ELEMENT contact (name, (address|GPS), phone, knows, description)><!ELEMENT description (#PCDATA | em | strong | br)*><!ELEMENT br EMPTY><!ELEMENT description ANY>
  7. 7. Indicator Description[none] when no cardinality indicator is used, it indicates that the element must appear once and only once. This is the default behavior for elements used in content models.? Indicates that the element may appear either once or not at all+ Indicates that the element may appear one or more times* Indicates that the element may appear zero or more times<!ELEMENT name (first+, middle?, last)>
  8. 8. <!ATTLIST contacts source CDATA #IMPLIED>
  9. 9. Type DescriptionCDATA Indicates that the attribute value is character data. Notice that this is slightly different from the PCDATA keyword in ELEMENT declarations.ID Indicates that the attribute value uniquely identifies the containing elementIDREF Indicates that the attribute value is a reference, by ID, to a uniquely identifiable elementIDREFS Indicates that the attribute value is a whitespace-separated list of IDREF valuesENTITY Indicates that the attribute value is a reference to an external unparsed entityENTITIES Indicates that the attribute value is a whitespace-separated list of ENTITY valuesNMTOKEN Indicates that the attribute value is a name token.NMTOKENS Indicates that the attribute value is a whitespace-separated list of NMTOKEN valuesEnumerated List Apart from using the default types, you can also declare an enumerated list of possible values for the attribute.
  10. 10. ©©
  11. 11. <!ENTITY empty-gps “<latitude></latitude><longitude></longitude>”><!ENTITY jeff-description SYSTEM “jeff.txt”>
  12. 12. <!ENTITY % DefaultPhoneKind “Home”><!ENTITY % NameDeclarations SYSTEM “name4.dtd”>

×