Home

XMLSchema

XML Schema is a language for defining the structure, content, and semantics of XML documents. The standard, developed by the World Wide Web Consortium (W3C) and often referred to as XML Schema Definition (XSD), specifies how to declare elements, attributes, data types, and the allowable document structure, enabling validation of XML instances against a schema. The schema language is expressed as XML itself and uses the namespace http://www.w3.org/2001/XMLSchema.

XML Schema originated in the early 2000s as a comprehensive replacement for DTDs, offering a typed data

Key features include a rich type system with built-in and user-defined simpleType and complexType definitions, inheritance

In practice, XML Schema files are used to validate XML documents, guide data binding in programming languages,

model
and
better
support
for
modularization,
namespaces,
and
extensibility.
The
core
specifications
were
published
as
W3C
Recommendations
for
XML
Schema
1.0,
with
XML
Schema
1.1
released
later.
The
language
is
designed
to
describe
the
allowable
content
of
elements
and
attributes,
enforce
data
types,
and
express
constraints
beyond
what
DTDs
provide,
including
complex
type
definitions
and
formal
relationships
between
elements.
through
extension
and
restriction,
and
facets
that
constrain
values.
It
supports
lists
and
unions,
identity
constraints
such
as
key,
unique,
and
keyref,
and
structuring
constructs
like
sequence,
choice,
and
all
for
content
models.
Schemas
can
import
or
include
other
schemas,
and
support
namespaces
to
enable
reuse
and
composition.
and
define
data
interchange
contracts.
While
it
remains
the
most
widely
adopted
XML
schema
language,
it
coexists
with
other
schema
approaches
such
as
Relax
NG
and
Schematron,
and
with
older
DTD-based
validation.