dtddoc_features.dtd: Elements - Entities - Source | Intro - Index
FRAMES / NO FRAMES

DTDDoc features demo

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

<cardinality>'s children
NameCardinality
anyNumberAny number
atLeastOneAt least one
oneOrNoneOne or none
onlyOneOnly one
Element's model:

(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.

<contentTypes>'s children
NameCardinality
anyOnly one
emptyOnly one
pcdataOnly one
Element's model:

(empty, pcdata, any)


<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.

<associationTypes>'s children
NameCardinality
combinedOnly one
followOnly one
selectOnly one
Element's model:

(follow, select, combined)


<follow> Child of select, associationTypes, combined

association type : follow

<follow>'s children
NameCardinality
cardinalityOnly one
combinedOnly one
selectOnly one
Element's model:

(cardinality, select, combined)


<select> Child of follow, associationTypes, combined

association type : select

<select>'s children
NameCardinality
cardinalityOne or none
combinedOne or none
followOne or none
Element's model:

(cardinality | follow | combined)


<combined> Child of follow, select, associationTypes

association type : combined

<combined>'s children
NameCardinality
cardinalityOnly one
followOne or none
selectAny number
Element's model:

(cardinality, (follow | select*), (follow | (select?, follow+)))


<attributeTypes> Child of declaredRoot

attributes

<attributeTypes>'s attributes
NameValuesDefault
cdata
entitiesMatch the ENTITIES rules.
entityMatch the ENTITY rules.
idMatch the ID rules.
idrefMatch the IDREF rules.
idrefsMatch the IDREFS rules.
listOfValuesval1, val2, val3
nmtokenMatch the NMTOKEN rules.
nmtokensMatch the NMTOKENS rules.
notationnot1, 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
NameValuesDefault
defaultdefault value
defaultNotationnot1, not2, not3not2
fixedfixed value
implied
listOfValuesval1, val2, val3val2
listOfValuesWithEntityentity, value
onlyOneAttribute
required
valueUsingCharEntitydelta 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)

<guessedRoot>'s children
NameCardinality
cardinalityOnly one
Element's model:

(cardinality)


<guessedRoot2> Root element

Multiple root nodes can be detected

<guessedRoot2>'s children
NameCardinality
cardinalityOne or none
declaredRootOne or none
Element's model:

(cardinality | declaredRoot)


<declaredRoot> Root element, child of guessedRoot2

Root nodes can be explicitely declared so, using root tag in the first comment.

<declaredRoot>'s children
NameCardinality
associationTypesOnly one
attributeTypesOnly one
autogeneratedOnly one
cardinalityOnly one
contentTypesOnly one
defaultTypesOnly one
hiddenOnly one
includeOnly one
Element's model:

(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
NameValuesDefault
id
xmlns

@id Attribute of autogenerated

Element identifier.


@xmlns Attribute of autogenerated

XML namespace of the element.