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
ElementDOCTYPE
in a DTDxmlns
- specifies the default namespace for the
elements and attributestargetNamespace
- An optional namespace
for the schemasimpleType
or complexType
element
attribute
attribute
Elementname
type
fixed
or default
- an optional
constant or default valueuse
- either optional
,
prohibited
, or required
simpleType
element
Elementname
type
minOccurs
- optional minimum number of
occurrencesmaxOccurs
- optional maximum number of
occurrencessimpleType
ElementELEMENT
in a DTD
(i.e., defines a type)name
restriction
or list
or union
simpleType
Element (cont.)
complexType
ElementELEMENT
in a DTD
(i.e., defines a type)name
simpleContent
or complexContent
group
or all
or
choice
or sequence
attribute
complexType
Element (cont.)
restriction
Elementrestriction
Element (cont.)
extension
Elementbase
group
or all
or
choice
or sequence
attribute
extension
Element (cont.)
simpleContent
Elementrestriction
or extension
simpleContent
Element (cont.)
complexContent
Elementrestriction
or extension
alternative
Elementtest
- the test to performtype
- the type to use when the test passesalternative
Element (cont.)
assert
Elementtest
- the test to performaseert
Element (cont.)