01.07.2013 Views

Ph.D. Thesis - Business Informatics Group

Ph.D. Thesis - Business Informatics Group

Ph.D. Thesis - Business Informatics Group

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2.2 DTDs and Ecore at a Glance<br />

2.2.1 Document Type Definition (DTD) Concepts<br />

The UML class diagram given in Figure 2.4 is based on previous work [KKR04] and depicts<br />

the DTD concepts present in the WebML DTD. These concepts need to be considered for<br />

finding correspondences to MOF concepts and consequently are reviewed briefly in the<br />

following.<br />

*<br />

DTD<br />

XMLDTD<br />

ParameterEntityDec<br />

1<br />

1..*<br />

1 *<br />

name:String<br />

value:String<br />

XMLStringAtt<br />

1..*<br />

XMLElemType<br />

name:String<br />

1 *<br />

XMLAttribute<br />

name:String<br />

declaration:AttDec<br />

XMLTokenAtt<br />

kind:TokenKind<br />

XMLEnumAtt<br />

XMLAtomicET<br />

value:String<br />

XMLCompositeET XMLEmptyET XMLAnyET<br />

1<br />

1..*<br />

XMLEnumLiteral<br />

XMLCompositeET<br />

MixedContent<br />

«enumeration»<br />

ContCard<br />

• zero-or-one<br />

• zero-or-many<br />

• one-or-many<br />

XMLCompositeET<br />

ElemContent<br />

XMLElemType<br />

*<br />

1 XMLContentParticle<br />

cardinality:ContCard [0..1]<br />

1..*<br />

nested:Boolean<br />

2..*<br />

XMLSequence XMLChoice<br />

«enumeration»<br />

AttDec<br />

• default_value<br />

•#REQUIRED<br />

•#IMPLIED<br />

•#FIXED<br />

«enumeration»<br />

TokenKind<br />

• ID<br />

• IDREF<br />

• IDREFS<br />

•NMTOKEN<br />

•NMTOKENS<br />

Figure 2.4: Overview of Relevant DTD Language Concepts<br />

In general, DTD’s contain markup declarations comprising element types (XMLElemType)<br />

and attributes (XMLAttributes) for defining the logical structure as well as primarily<br />

entity declarations (e.g., ParameterEntityDec), as a reuse mechanism for certain reoccurring<br />

markup declarations, defining the physical structure.<br />

Element types, being first-class citizens in DTDs, have a name and are specialized into<br />

XMLAtomicET (contains no other element types but character data), XMLEmptyET (no content<br />

is allowed), XMLAnyET (the content is not constrained), XMLCompositeETMixed-<br />

Content (a mix of character data and child element types), and XMLCompositeETElem-<br />

Content (consists of an XMLContentParticle). An XMLContentParticle either is an<br />

XMLSequence, an XMLChoice, or an XMLElemType. An XMLChoice or an XMLSequence<br />

can be enclosed in parentheses for grouping purposes and suffixed with a ’?’ (zero or one<br />

occurrences), ’*’ (zero or more occurrences), or ’+’ (one or more occurrences), whereas the<br />

absence of a particular symbol denotes a cardinality of exactly one.<br />

Attribute declarations define one or multiple XMLAttributes (i.e., name-value pairs)<br />

for a single element type. Each XMLAttribute has a name, a data type, and a default declaration.<br />

The most commonly used data types for attributes are: CDATA (XMLStringAtt),<br />

ID, IDREF (refers to one ID-typed element), IDREFS (refers to multiple ID-typed elements),<br />

21

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!