|
Imposing Structure on XML Documents Using a Schema
An Introduction to Schemas |
|
Prof. David Bernstein
|
| Computer Science Department |
| bernstdh@jmu.edu |
schemaLocation or
noNamespaceSchemaLocation depending on whether or not
the schema has a target namespaceSchema Element
DOCTYPE in a DTDxmlns - specifies the default namespace for the
elements and attributestargetNamespace - An optional namespace
for the schemasimpleType or complexType
element
attribute
attribute Element
name
type
fixed or default - an optional
constant or default valueuse - either optional,
prohibited, or required
simpleType
element Element
name
type
minOccurs - optional minimum number of
occurrencesmaxOccurs - optional maximum number of
occurrencessimpleType Element
ELEMENT in a DTD
(i.e., defines a type)name
restriction or list
or union
simpleType Element (cont.)
complexType Element
ELEMENT in a DTD
(i.e., defines a type)name
simpleContent or complexContent
group or all or
choice or sequence
attribute
complexType Element (cont.)
restriction Element
restriction Element (cont.)
extension Element
base
group or all or
choice or sequence
attribute
extension Element (cont.)
simpleContent Element
restriction or extension
simpleContent Element (cont.)
complexContent Element
restriction or extension
alternative Element
test - the test to performtype - the type to use when the test passesalternative Element (cont.)
assert Element
test - the test to performaseert Element (cont.)