Reading Time: 2 minutes

XML specifications define standardized rules and structures that enable consistent creation, processing, and exchange of XML documents on the World Wide Web. These specifications are developed and maintained by the World Wide Web Consortium (W3C).

The official specifications for XML and related technologies are published and updated by W3C and can be found on their recommendation pages.

XML Specification

The XML specification defines the syntax rules used for creating XML documents. It is based on earlier international text-processing standards and adapted for use on the web.

The latest XML specification details are available at:

http://www.w3.org/TR/REC-xml


XML Namespaces

The XML Namespaces specification is a W3C recommendation that improves interoperability by avoiding naming conflicts in XML documents.

Namespaces provide a simple and elegant method for qualifying element and attribute names by associating them with a namespace URI. A namespace represents a collection of names used as element types and attribute names.

This specification explains:

  • Declaring namespaces
  • Namespace scoping
  • Default namespaces
  • Namespace prefixes

The XML Namespaces specification can be found at:


http://www.w3.org/TR/2004/REC-xml-names11-20040204


XML Information Set

The XML Information Set (Infoset) specification defines a set of abstract data structures that represent the information contained in a well-formed XML document.

It describes information items such as:

  • Document information items
  • Element information items
  • Attribute information items

An XML document does not need to be valid to have an information set, but it must satisfy certain namespace constraints. The structure can be defined using languages such as XSD, RELAX NG, or ASN.1.

The XML Information Set specification is available at:


http://www.w3.org/TR/2004/REC-xml-infoset-20040204


XML Path Language (XPath)

The XML Path Language (XPath) specification defines a language for addressing and selecting parts of an XML document.

XPath is used by technologies such as XSLT and XPointer and allows manipulation of node sets, strings, numbers, and Boolean values.

XPath expressions evaluate to one of four basic types:

  • Node-set – an unordered collection of nodes
  • Boolean – true or false
  • Number – a floating-point number
  • String – a sequence of Unicode characters

Expression evaluation occurs within a context that includes:

  • A context node
  • Non-zero positive integers
  • Variable bindings
  • A function library
  • Namespace declarations in scope

The XPath specification can be accessed at:


http://www.w3.org/TR/1999/REC-xpath-19991116


XSL Transformations (XSLT)

XSL Transformations (XSLT) define a language for transforming XML documents into other XML documents or different formats.

XSLT is designed to be used as part of XSL, which is a stylesheet language for XML. XSL also includes formatting vocabularies, while XSLT focuses specifically on transformation logic.

XSLT specifications cover:

  • Stylesheet structure
  • XSLT namespaces
  • Template rules
  • Combining and embedding stylesheets

The XSLT specification is available at:


http://www.w3.org/TR/1999/REC-xslt-19991116


XML Schema

The XML Schema specification defines a schema definition language that describes the structure and content of XML documents.

XML Schema serves as an alternative to DTD and provides stronger data typing and validation capabilities.

An XML Schema can define:

  • Which elements may appear in a document
  • Which attributes may appear
  • Child element relationships
  • Element order
  • Allowed number of child elements

The XML Schema specification is available at:


http://www.w3.org/TR/2004/PER-xmlschema-0-20040318


XQuery: An XML Query Language

XQuery is a query language designed to extract and manipulate data from XML documents. It supports querying both real and virtual XML documents and integrates concepts
from database query languages.

XQuery enables interaction between web-based XML data and database systems, allowing XML documents to be treated similarly to databases.

XQuery features concise syntax and supports large-scale XML data queries across documents and relational databases.

The XQuery specification can be found at:


http://www.w3.org/TR/2004/WD-xquery-semantics-20040220