dtddoc_features.dtd
: Elements - Entities - Source | Intro - Index
FRAMES / NO FRAMES
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- This DTD is just here as a demo of DTDDoc's features. <i>HTML</i> format support, with escaping (useful to give examples in XML): % <this should="be escaped"/> % Accents (not UTF-8 source) : a/à/â/ä, e/é/è/ê/ë, i/î/ï, o/ô/ö, u/û/ü, c/ç. It is possible to have <PRE> sections (we preserve spaces). Such as: <pre> First line Second line </pre> One can also have <b>HTML</b> <i>tags</i> in the comments. But non-html tags are automatically escaped like <this/>. @title DTDDoc features demo @doctype declaredRoot SYSTEM "http://dtddoc.sf.net/dtddoc_features.dtd" @example example tag @root declaredRoot --> <!-- cardinality test --> <!ELEMENT cardinality (onlyOne, oneOrNone?, anyNumber*, atLeastOne+)> <!-- Cardinality "only one" --> <!ELEMENT onlyOne (#PCDATA)> <!-- Cardinality "one or none" : <code>?</code> --> <!ELEMENT oneOrNone (#PCDATA)> <!-- Cardinality "any number" : <code>*</code> --> <!ELEMENT anyNumber (#PCDATA)> <!-- Cardinality "at least one" : <code>+</code> --> <!ELEMENT atLeastOne (#PCDATA)> <!-- Content types. @fixme For the moment, <code>#CDATA</code> is not supported. --> <!ELEMENT contentTypes (empty, pcdata, any)> <!-- Content type <code>EMPTY</code> --> <!ELEMENT empty EMPTY> <!-- Content type <code>#CDATA</code> --> <!--ELEMENT cdata (#CDATA)--> <!-- Content type <code>#PCDATA</code> --> <!ELEMENT pcdata (#PCDATA)> <!-- Content type <code>ANY</code> --> <!ELEMENT any ANY> <!-- Every assocition types are supported. --> <!ELEMENT associationTypes (follow, select, combined)> <!-- association type : follow --> <!ELEMENT follow (cardinality, select, combined)> <!-- association type : select --> <!ELEMENT select (cardinality | follow | combined)> <!-- association type : combined --> <!ELEMENT combined (cardinality, (follow | select*), (follow | (select?, follow+)))> <!-- attributes --> <!ELEMENT attributeTypes (#PCDATA)> <!-- @attr cdata CDATA attribute @attr entity ENTITY attribute @attr entities ENTITIES attribute @attr id ID attribute @attr idref IDREF attribute @attr idrefs IDREFS attribute @attr nmtoken NMTOKEN attribute @attr nmtokens NMTOKENS attribute @attr notation NOTATION attribute @attr listOfValues list of values attribute @fixme NOTATION not supported --> <!ATTLIST attributeTypes cdata CDATA #IMPLIED entity ENTITY #IMPLIED entities ENTITIES #IMPLIED id ID #IMPLIED idref IDREF #IMPLIED idrefs IDREFS #IMPLIED nmtoken NMTOKEN #IMPLIED nmtokens NMTOKENS #IMPLIED notation NOTATION ( not1 | not2 | not3 ) #IMPLIED listOfValues ( val1 | val2 | val3 ) #IMPLIED > <!-- different types of default value --> <!ELEMENT defaultTypes EMPTY> <!-- @attr default default value provided @attr defaultNotation default value provided for a notation attribute @attr fixed fixed value (provided) @attr required attribute required, but no default value provided @attr implied optionnal attribute @attr listOfValues default value provided, chosen from a list --> <!ATTLIST defaultTypes default CDATA "default value" defaultNotation NOTATION ( not1 | not2 | not3 ) "not2" fixed CDATA #FIXED "fixed value" required CDATA #REQUIRED implied CDATA #IMPLIED listOfValues ( val1 | val2 | val3 ) "val2" > <!-- <code>attr</code> tag is not necessary when one attribute is declared at a time --> <!ATTLIST defaultTypes onlyOneAttribute CDATA> <!-- entity declaration --> <!ENTITY % entity "( entity | value )"> <!-- character entity declaration : greek small letter delta, U+03B4 ISOgrk3 --> <!ENTITY delta "δ"> <!-- general entity --> <!ENTITY generalEntity "a general entity"> <!-- @attr listOfValuesWithEntity list of values defined using an entity value @attr valueUsingCharEntity a value using a char entity --> <!ATTLIST defaultTypes listOfValuesWithEntity %entity; #REQUIRED valueUsingCharEntity CDATA "delta character entity = 'δ'" > <!-- This tag contains hidden comments after these ones. @hidden hidden comment, that will be printed in the documentation only if showHidden=true (false by default) --> <!ELEMENT hidden (#PCDATA)> <!-- a SYSTEM entity can be used to inlude some DTD content into the current DTD --> <!ENTITY % systemEntity SYSTEM "common/dtddoc_features_include.dtd"> %systemEntity; <!-- notation declaration --> <!NOTATION GIF SYSTEM "GIF"> <!--- triple hyphens comments (a la javadoc) are treated as normal comments --> <!ELEMENT tripleHyphens (#PCDATA)> <!-- A bug in DTDDoc 0.0.11 caused that comment could not contain question mark : is it really fixed ? --> <!ELEMENT question (#PCDATA)> <!-- DTDDoc can guess root nodes (nodes that have no parent) --> <!ELEMENT guessedRoot (cardinality)> <!-- Multiple root nodes can be detected --> <!ELEMENT guessedRoot2 (cardinality | declaredRoot)> <!-- Root nodes can be explicitely declared so, using <code>root</code> tag in the first comment. @root --> <!ELEMENT declaredRoot (cardinality, contentTypes, associationTypes, attributeTypes, autogenerated, defaultTypes, hidden, include)> <!-- The attributes of this element can have their documentation automatically generated (the doc is based on the name of the attribute). --> <!ELEMENT autogenerated (#PCDATA)> <!ATTLIST autogenerated id CDATA #IMPLIED xmlns CDATA #IMPLIED >