XML - schema (without capital S)

Card Puncher Data Processing


A schema contains a set of rules that constrains the structure and content of an xml document, i.e., its elements, attributes, and text.

A schema is, in other words, a specification of the syntax and semantics of a (potentially infinite) set of XML documents. A document is said to be valid with respect to a schema if, and only if, it satisfies the constraints specified in the schema.

The purpose of a schema is to define a class of XML documents, and so the term “instance document” is often used to describe an XML document that conforms to a particular schema.

An XML schema is a description of a type of XML document, typically expressed in terms of constraints on:

These constraints are generally expressed using rules to define:

They provide a means for defining:

of XML documents.

With an schema, an application can automatically parses an XML document and assign to the content the good data type. A schema describes data types, with the intent of defining one or more hierarchical types defining XML documents.

The purpose of a schema is to define a class of XML documents, and so the term “instance document” is often used to describe an XML document that conforms to a particular schema.

In what language is a schema defined?

The XML specification itself describes a sublanguage for writing document-type definitions, or DTDs.

The Document Type Definition (DTD) language is then native to the XML specification. It is of relatively limited capability, but has also other uses in XML aside from the expression of schemas.

DTDs are fairly weak. They support the definition of simple constraints on structure and content, but provide no real facility for expressing datatypes or complex structural relationships.

The XML Schema language has gained widespread acceptance. It is the schema language of choice for many of the XML related specifications authored by industry standard working groups. Xsd provide functionality above and beyond what is provided by DTD.

Other languages:

  • XDR,
  • SOX,
  • TREX


The mechanism for associating an XML document with a schema varies according to the schema language. The association may be achieved via markup within the XML document itself, or via some external means.

Documentation / Reference

Discover More
Card Puncher Data Processing
Extensible Markup Language (XML)

is a flexible way to create common information formats and to share the formats and data between applications and on the internet. XML is, essentially, a platform-independent means of structuring informationelementschemjsoXML...
Java Conceptuel Diagram
Java - Java API for XML Binding (JAXB) - (Un)Marshaller

API JAXB is a serialization library (Java binding tool) between XML and Object. It uses annotations to bind XML documents to a java object model. Located under the javax.xml.bind package. It generates...
Java Conceptuel Diagram
Java XML - DOM

in JAVA Type Best suited API XML Schema supported Document DOM JAXP Yes Data JDOM, dom4j, regular-expression No Standards such as JDOM and dom4j are targeted for applications where the XML...
Card Puncher Data Processing
XML - (XML Schema Definition|XSD) (Schema With Capital S)

The in XML. XML Schema definition language (Xsd) is a language that define an XML schema (usually written in the W3C XML Schema Language). It provides functionality...
Card Puncher Data Processing
Xml - Element Id

Elements have an ID only when the document has a schema (DTD, Xml Schema), which specifies which attribute has the ID type.

Share this page:
Follow us:
Task Runner