O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

Schema languages

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Próximos SlideShares
XML Schemas
XML Schemas
Carregando em…3
×

Confira estes a seguir

1 de 25 Anúncio

Mais Conteúdo rRelacionado

Diapositivos para si (18)

Anúncio

Semelhante a Schema languages (20)

Mais de Hoang Nguyen (20)

Anúncio

Mais recentes (20)

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 Description CDATA 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 element IDREF Indicates that the attribute value is a reference, by ID, to a uniquely identifiable element IDREFS Indicates that the attribute value is a whitespace-separated list of IDREF values ENTITY Indicates that the attribute value is a reference to an external unparsed entity ENTITIES Indicates that the attribute value is a whitespace-separated list of ENTITY values NMTOKEN Indicates that the attribute value is a name token. NMTOKENS Indicates that the attribute value is a whitespace-separated list of NMTOKEN values Enumerated List Apart from using the default types, you can also declare an enumerated list of possible values for the attribute.
  10. 10. &#169; &#x00A9;
  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”>

×