dtddoc_features.dtd
: Elements - Entities - Source | Intro - Index
FRAMES / NO FRAMES
Usage: <!DOCTYPE declaredRoot SYSTEM "http://dtddoc.sf.net/dtddoc_features.dtd">
This DTD is just here as a demo of DTDDoc's features.
HTML 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:
First line Second line
One can also have HTML tags in the comments. But non-html tags are automatically escaped like <this/>.
Example: example tag
<cardinality> | Child of declaredRoot, guessedRoot2, follow, select, guessedRoot, combined |
cardinality test
Element's model:
<cardinality>'s children Name Cardinality anyNumber Any number atLeastOne At least one oneOrNone One or none onlyOne Only one
(onlyOne, oneOrNone?, anyNumber*, atLeastOne+)
<onlyOne> | Child of cardinality |
Cardinality "only one"
<oneOrNone> | Child of cardinality |
Cardinality "one or none" : ?
<anyNumber> | Child of cardinality |
Cardinality "any number" : *
<atLeastOne> | Child of cardinality |
Cardinality "at least one" : +
<contentTypes> | Child of declaredRoot |
Content types.
Element's model:
<contentTypes>'s children Name Cardinality any Only one empty Only one pcdata Only one
<empty/> | Child of contentTypes |
Content type EMPTY
This element is always empty.
<pcdata> | Child of contentTypes |
Content type #PCDATA
<any> | Child of contentTypes |
Content type ANY
This element accepts any declared element as its children.
<associationTypes> | Child of declaredRoot |
Every assocition types are supported.
Element's model:
<associationTypes>'s children Name Cardinality combined Only one follow Only one select Only one
<follow> | Child of select, associationTypes, combined |
association type : follow
Element's model:
<follow>'s children Name Cardinality cardinality Only one combined Only one select Only one
(cardinality, select, combined)
<select> | Child of follow, associationTypes, combined |
association type : select
Element's model:
<select>'s children Name Cardinality cardinality One or none combined One or none follow One or none
(cardinality | follow | combined)
<combined> | Child of follow, select, associationTypes |
association type : combined
Element's model:
<combined>'s children Name Cardinality cardinality Only one follow One or none select Any number
(cardinality, (follow | select*), (follow | (select?, follow+)))
<attributeTypes> | Child of declaredRoot |
attributes
<attributeTypes>'s attributes Name Values Default cdata entities Match the ENTITIES rules. entity Match the ENTITY rules. id Match the ID rules. idref Match the IDREF rules. idrefs Match the IDREFS rules. listOfValues val1, val2, val3 nmtoken Match the NMTOKEN rules. nmtokens Match the NMTOKENS rules. notation not1, not2, not3
@cdata | Attribute of attributeTypes |
CDATA attribute
@entity | Attribute of attributeTypes |
ENTITY attribute
Possible values: Match the ENTITY rules.
@entities | Attribute of attributeTypes |
ENTITIES attribute
Possible values: Match the ENTITIES rules.
@id | Attribute of attributeTypes |
ID attribute
Possible values: Match the ID rules.
@idref | Attribute of attributeTypes |
IDREF attribute
Possible values: Match the IDREF rules.
@idrefs | Attribute of attributeTypes |
IDREFS attribute
Possible values: Match the IDREFS rules.
@nmtoken | Attribute of attributeTypes |
NMTOKEN attribute
Possible values: Match the NMTOKEN rules.
@nmtokens | Attribute of attributeTypes |
NMTOKENS attribute
Possible values: Match the NMTOKENS rules.
@notation | Attribute of attributeTypes |
NOTATION attribute
Possible values: not1, not2, not3
@listOfValues | Attribute of attributeTypes |
list of values attribute
Possible values: val1, val2, val3
<defaultTypes/> | Child of declaredRoot |
different types of default value
<defaultTypes>'s attributes Name Values Default default default value defaultNotation not1, not2, not3 not2 fixed fixed value implied listOfValues val1, val2, val3 val2 listOfValuesWithEntity entity, value onlyOneAttribute required valueUsingCharEntity delta character entity = 'δ'
This element is always empty.
@default | Attribute of defaultTypes |
default value provided
Default value: default value
@defaultNotation | Attribute of defaultTypes |
default value provided for a notation attribute
Possible values: not1, not2, not3 - Default value: not2
@fixed | Attribute of defaultTypes |
fixed value (provided)
Fixed value: fixed value
@required | Attribute of defaultTypes |
attribute required, but no default value provided
Required
@implied | Attribute of defaultTypes |
optionnal attribute
@listOfValues | Attribute of defaultTypes |
default value provided, chosen from a list
Possible values: val1, val2, val3 - Default value: val2
@onlyOneAttribute | Attribute of defaultTypes |
attr
tag is not necessary when one attribute is declared at a time
@listOfValuesWithEntity | Attribute of defaultTypes |
list of values defined using an entity value
Possible values: entity, value - Required
@valueUsingCharEntity | Attribute of defaultTypes |
a value using a char entity
Default value: delta character entity = 'δ'
<hidden> | Child of declaredRoot |
This tag contains hidden comments after these ones.
<include> | Child of declaredRoot |
An element defined in a separate file, for inclusion with a SYSTEM entity (see the entities list).
<tripleHyphens> | Root element |
triple hyphens comments (a la javadoc) are treated as normal comments
<question> | Root element |
A bug in DTDDoc 0.0.11 caused that comment could not contain question mark : is it really fixed ?
<guessedRoot> | Root element |
DTDDoc can guess root nodes (nodes that have no parent)
Element's model:
<guessedRoot>'s children Name Cardinality cardinality Only one
<guessedRoot2> | Root element |
Multiple root nodes can be detected
Element's model:
<guessedRoot2>'s children Name Cardinality cardinality One or none declaredRoot One or none
<declaredRoot> | Root element, child of guessedRoot2 |
Root nodes can be explicitely declared so, using root
tag
in the first comment.
Element's model:
<declaredRoot>'s children Name Cardinality associationTypes Only one attributeTypes Only one autogenerated Only one cardinality Only one contentTypes Only one defaultTypes Only one hidden Only one include Only one
(cardinality, contentTypes, associationTypes, attributeTypes, autogenerated, defaultTypes, hidden, include)
<autogenerated> | Child of declaredRoot |
The attributes of this element can have their documentation automatically generated (the doc is based on the name of the attribute).
<autogenerated>'s attributes Name Values Default id xmlns
@id | Attribute of autogenerated |
Element identifier.
@xmlns | Attribute of autogenerated |
XML namespace of the element.