·  XML – DTD – Elements

 

- Info:

  - This tutorial shows possible DTD elements and their attributes.

 

- Elements:

  <!DOCTYPE   - Defines name for root tag and all the valid tags insiede XML document.

  <!ELEMENT   - Defines tag name and data type.

  <!ATTLIST   - Defines attribute list for a tag.

  <!ENTITY    - For text replacement.

  <!NOTATION  - For including external files in XML document. <!NOTATION GIF system "image/gif">

 

- Attributes:

  (#CDATA)    - element contains character data that is not supposed to be parsed by a parser.

  (#PCDATA)   - element contains data that is going to be parsed by a parser

  (ANY)       - element with any content.

  (mobile)    - element must containg exactly one child "mobile"

  (mobile+)   - element must containg exactly one or more child "mobile"

  (mobile*)   - element must containg exactly zero or more child "mobile"

  (mobile?)   - element must containg exactly zero or one child "mobile"

  (to+,from)  - element must containg exactly one or more child "to" and exactly one child "from" in given order

  enumerated  - an exact list of options, like in my example above

  ID          - a unique name for the element

  IDREF       - the value of an ID type attribute

  IDREFS      - multiple IDs, separated by whitespace

  ENTITY      - the name of an entity declared in the DTD

  ENTITIES    - multiple entities, separated by whitespace

  NMTOKEN     - an XML name

  NMTOKENS    - multiple XML names, separated by whitespace

  NOTATION    - the name of a notation declared in the DTD