OII Standards and Specifications List


I*M Europe
OII Home Page
What is OII?
Standards List
OII Guides
OII Fora List
Conference Reports
Monthly Reports
EC Reports
Whats New?
OII Index
OII FAQ
OII Feedback
Disclaimer
Search Database

OII Guide to XML and related standards

The Extensible Markup Language (XML) is a World Wide Web Consortium (W3C) Recommendation for marking up screen presentable data that cannot be marked up using the simple set of document presentation elements defined in the HyperText Markup Language (HTML). Whilst designed initially for the display of documentation distributed via the World Wide Web (WWW), XML is now widely accepted as a generalized method for interchanging information between computer programs over the Internet. In particular it is widely seen as the best solution for the interchange of metadata about stored objects and programs (e.g. the Open Software Description) and for the interchange of commercial information (e.g. Open Trading Protocol (OTP)).

By the middle of 1998 all major web browser manufacturers had announced that the next version of their products would accept XML coded files. A wide range of XML development tools have already been made available by companies ranging in size from Microsoft, IBM, Sun and Netscape down to individual developers of shareware, such as James Clark.

The XML Family

The Extensible Markup Language will be defined in stages in a number of W3C Recommendations. At present it is envisaged that the following recommendations will be defined:
  • The Extensible Markup Language (XML), which defines how to declare and use the logical and physical components of an XML document
  • The XML Link Language (XLink), which will define how relationships between XML document should be recorded
  • The XML Pointer Language (XPointer), which will be used by XLinks and other members of the XML family to reference sets of logical elements within XML and HTML documents by reference to their position within the document, their contents, or any unique identifiers individual elements have been assigned
  • The Extensible Stylesheet Language (XSL), which will be used to control the display of XML files on screen, and to determine how printed versions of the file should be processed
  • A number of XML Schema Definitions, which will be used to describe the way in which XML documents should be structured in a form that is more detailed than is currently possible using an XML document type definition.

W3C have also developed a Document Object Model (DOM) that can be used for managing access to the component parts of any document structured according to either HTML or XML. In addition aSimple API for XML (SAX) has been developed by members of the XML Developers Electronic Discussion Group to enable simple interconnection of XML tools.

Documents can be viewed in terms of their content, their structure or their presentation. XML is about capturing the structure of the content in a machine readable format. The Extensible Stylesheet Langauge (XSL) is designed to control the presentation of XML content.

By divorcing the "formatting output specification" (stylesheet) that controls the presentation from the content and the structure of the data it is possible to develop multiple versions of the same content for presentation using different media. To make this possible the output specification must support structural transformation to allow subsetting and re-ordering of data. It is structural transformation that differentiates XSL from the existing Cascading Style Sheets (CSS) proposal for controlling the presentation of HTML documents.

Note: When talking about XML it is important to distinguish between the XML specification, which describes the logical role of the data, and the supporting family of standards that allow applications to manipulate this data. In the following text XML, unless otherwise qualified, refers to the logical structure of the data.

The Role of XML

XML is a simple dialect of the Standard Generalized Markup Language (SGML) defined in ISO Standard 8879. SGML was designed in the 1980's as a tool to enable technical documentation and other forms of publishable data to be interchanged between authors, publishers and those responsible for the production of printed copies of data sets. By providing a formal definition of the component parts of a publishable information set, SGML made it possible to verify the correct transmission and receipt of interchanged data. It was soon found that these techniques are applicable in areas other than those directly related to publications. For example, SGML is often used as a neutral data format when moving data between databases as part of multinational projects. The advent of XML has seen this role extended to provide a standardized methodology for interchanging structured data between computer systems.

The goal of XML is to enable SGML-coded data to be served, received, and processed on the Web in the way that is as easy as that currently made possible by use of the fixed SGML tag set provided by HTML. XML has been designed for ease of implementation and for interoperability with both SGML and HTML. Unlike SGML and HTML, however, XML has been based from the very start on the ISO 10646 Universal Multi-Octet Coded Character Set (UCS), which contains all the characters and signs used by major trading nations.

SGML on the Web v. Extensible HTML

While the original goal of the developers of XML was to enable SGML documents to be exchanged over the World-Wide Web (WWW), it was soon seen that XML would also provide a standardized mechanism for extending the HTML DTD that forms the basis of existing WWW applications. The next version of the HTML specification will allow HTML documents to embed pieces of XML code by simply enclosing the XML data between <XML> and </XML> markup tags. The Cascading Style Sheets (CSS) specification will be extended to allow formatting rules to be associated with embedded XML elements.

XML as a General-purpose Web API

For many WWW applications it is necessary to interchange information which should not be displayed to users. Often this information is exchanged as part of the negotiations that take place when establishing a link between two systems via the network using the HyperText Transfer Protocol (HTTP). A Protocol Extension Protocol (PEP) for HTTP allows XML-encoded messages to be transferred between systems within an HTTP header. Most of the recently proposed extensions to HTTP have been defined in terms of XML-encoded data sets.

A wide range of applications that require the automated exchange of information between computer servers, without the use of a WWW browser, are now being developed using XML as thier data interchange format. By adopting a standardized language as their interchange format the cost of creating new applications can be reduced through the reuse of data stream analysis modules developed for existing applications.

Typical uses of XML

1. Management of Web Resources

Many of the initial uses of XML were developed by members of the web community who needed to manage resources that can be obtained via the Internet. Typical applications include:

2. Integrating Different Types of Media
Typical applications of XML for controlling non-textual data include:
3. Electronic Commerce

In addition to being used to enhance the functionality of the various types of commercial trading currently found on the Web, XML is also being used for many other types of electronic data interchange over the Internet. Typical electronic commerce applications include:

A number of proposals for using XML to encode existing EDI messages have been proposed, including proposals from UN/CEFACT SIMAC committee, theDISA X12C / CommerceNet XML/EDI Task Forceand the CEN/ISSS European XML/EDI Pilot Project.

A detailed listing of proposed XML applications can be found athttp://www.sgmlopen.org/cover/xml.html#applications.

XML

W3C's Extensible Markup Language (XML)recommendation states that an XML document instance must be created and stored as a set of properly nested data storage entities, each of which is made up of a number of logical elements which contain data or define processes to be performed. The outermost storage entity is referred to as the document entity: it contains both the start and the end of theroot or document element of the document instance. Elements can be nested to create hierarchies (information trees), and may contain references to embedded entities. Elements can be assignedattributes (properties) which indicate how the contents of the element should be interpreted.

Each XML element starts with a named start-tag and ends with an end-tag with a matching name. Outward pointing angle brackets are used to delimit these markup tags (e.g. <title>). An end-tag is distinguished from a start-tag by having a slash immediately preceding the name (e.g. </title>). Elements that have no contents are distinguished by having a slash immediately after the name in the start-tag to indicate that the end-tag has been omitted (e.g.<image/>). Because each element of an XML document has clearly marked limits, it is easy to determine when its contents have been received as a stream over a network.

Attributes of XML elements are defined as part of its start-tag (e.g. <image source="entity21"/>). Each XML attribute must be fully defined, with theattribute name followed by a value indicator (=) and a quote delimited string containing the attribute value. Attributes can be assigned a default value if an attribute list declaration is associated with the formal declaration for the element in a document type declaration (see below).

The XML specification requires that data that is not coded as XML characters be stored in a uniquely named unparsed entity, which may have associated with it the name of the notation in which its contents have been encoded. The location and notation of each unparsed entity must be declared in an entity declaration (e.g. <!ENTITY entity21 SYSTEM "http://www.myco.com/figs/figure1.gif" NDATA GIF>). The location of a processor for a notation can (optionally) be identified using a notation declaration (e.g. <!NOTATION GIF SYSTEM "show-gif.dll">). XML uses Internet Uniform Resource Locators (URLs) to identify locations of external entities and other types of files. Relative URLs can be used to identify locally stored information.

Parts of an XML document instance can be stored in separate files that will be referenced as external text entities. Such entities are declared in the same way as binary entities, except that there is no associated notation name. Alternatively internal text entities can be used to define the replacement text for an entity reference. For example, addition of an entity declaration of the form <!ENTITY company "The SGML Centre"> to a document type declaration will allow an entity reference of the form &company; to be entered in the associated document instance. This reference will be replaced by the quoted replacement text defined in the entity declaration when the file is processed (parsed).

The role of an XML document type declaration

The set of elements, attributes, entities and notations that can be used within an XML document instance can (optionally) be formally defined in a document type definition (DTD). The DTD is associated with the document instance through the addition of adocument type declaration that forms part of theprolog of a document instance.

Typically DTDs are developed by industry bodies or consortia, and are specifically designed to be shared by a number of companies. To facilitate this, and to encourage the sharing of declaration subsets, themarkup declarations that make up the document type definition can form part of a file referenced as anexternal subset of the document type declaration. Such files can be made up of a number of fragments, each of which can be referenced using a separate parameter entity, each of which references a separate web resource. By setting up repositories of resources containing DTD fragments, as well as complete DTDs, industry groups can significantly speed up the process of DTD development.

Where a DTD is unique to an application, or particular document, its markup declarations can be embedded, or referenced via an external entity, from within theinternal subset of the declaration.

Well-formed v validated XML

Where there is no formal declaration for an element, attribute or notation in the document type definition, an XML document processor (XML parser) will apply a set of default rules that are used to determine whether or not for the document instance is well-formed (i.e. contains a set of properly nested and delimited markup tags).

Alternatively documents can be validated both according to these default rules and by reference to an associated document type definition that constrains the order in which markup tags can be entered.

To clearly identify an XML document instance as conforming to the standard it must be preceded by aprocessing instruction indicating which version of XML the document conforms to, and what character encoding was used to create the storage entity. By default this XML declaration will take the form <?xml version="1.0" encoding="UTF-8"?>. This information can be supplemented by a statement indicated whether or not the document is self-contained (contains its own document type definition) by the addition ofstandalone="yes".

XLinks - Linking XML documents to other documents

The XML Linking Language (XLinks) working draftdefines two types of links, simple links and extended links. Simple links can be used to define user-activatable in-line links of the type found in HTML documents. Extended links allow a single 'hot-spot' in the text to reference more than one resource. Optionally, extended links can be stored outside the documents they link.

Contents identified by XLinks can optionally be embedded in referencing documents to create compound documents, or automatically switched to when the user accesses the file containing the link.

Objects referenced using XLinks can be identified from their markup, position and/or contents, and do not need to be a previously named link point, as is the case with referenced HTML elements. A fundamental difference between XML links and HTML links in that XML links allow "spans" of elements to be identified as the referenced data using a concept known as extended pointers (XPointers).

Simple XML links point to a single span, and are often defined in-line, with the contents of the linking element forming the "hot-spot" that users can click on to activate the link. An HTML anchor element (<A>) can be turned into an XML simple link by the assigning an additional attribute with a predefined default value to its attribute list declaration. Alternatively a specific instance of an HTML anchor element can be converted into an XML simple link by adding the following attribute definition: xml-link="simple".

Optional attributes associated with an XML simple link allow it to be assigned a displayable title, a namedrole for the element (which can affect the way in which the link element is displayed, perhaps as an icon in the margin), a content role (which can affect the way any content is displayed), a show attribute that indicates whether the linked data is to be shown in a new window, is to replace the contents of the current window, or is to be embedded as part of the current document (creating a compound document), and anactuate attribute to define whether the link is to be followed automatically or only when a user selects the link. A behaviour attribute allows special behaviour to be assigned to specific instances of a simple link.

Extended XML links can point to more than one span of data. They contain one or more locators that identify a possible link point. Each locator can have a title that can be used in place of any contents when a menu is displayed to ask users to select which of the permitted paths to choose from the linked document.

Extended link groups can be used to store a list of links in a document other than the ones that they reference. The extended link group identifies which documents a particular set of links applies to.

The difference between XML and HTML Links

The anchors used to create links within HTML documents can only reference a single named element within the same or another document. They cannot be used to reference sets of elements, or to identify data in documents which do not contain any uniquely named elements. When an HTML anchor is selected the current screen display is normally replaced completely by the file being referenced.

XML links will be much more flexible. For example, the data identified by an XML link can be requested from another file at the time the XML document is being loaded and can be copied directly into the referencing file, without the user necessarily being aware that the data has come from a different resource. Alternatively, when a user clicks on a hot-spot in an XML document he may be shown a menu of linked locations which he can choose to move to. These two techniques could be combined to allow hot spots that invoke pop-up menus to be embedded within a file even though they are defined as part of a separate resource.

XPointers - Identifying XML elements

The XML Pointer Language (XPointer) working draftdefines how the Uniform Resource Identifiers (URIs) used to identify documents exchanged over the Internet can be qualified by a structured query that identifies the part of the resource that is required to be shown to those traversing a link. The query is defined in terms of a set of location terms that refine the search criteria, starting from the document element that forms the root of the element hierarchy and progressively reducing the proportion of the document being referenced.

In addition to identifying HTML and XML elements by reference to a unique name assigned to the element within the source document, the XPointers will allow users to identify all the contents of a contiguous section (span) of a document, rather than just its title or first element. The XPointer specification also allows referenced data to be identified by selecting specific elements in the XML element tree (e.g. the third <section> element within the fourth <chapter>element) or by selecting elements with a specific content (e.g. the occurrence of the word XML within the contents of a <title> element).

XPointers can also be used to address elements in terms of their relationship to other elements. For example, you can select the first paragraph after a heading for special processing, or request a link to the second row of a table with a uniquely named identifier. Facilities are provided for selecting objects by reference to their element name, the values they have been assigned for specific attributes, their relationship to elements that precede them (their ancestors or siblings), the elements they contain (their descendants) and the elements that follow them.

The difference between URI fragment identifiers and XPointers

Within HTML documents the only way to reference a subcomponent of an HTML document is by entering the name assigned to one of the HTML anchors within the document as a fragment identifier that qualifies the URI used to locate the relevant resource over the Internet. The server will return the whole of the identified resource, and on receipt the client will search for the appropriate name within the retrieved document. The alternative to this is to specify a query that is to be run on a database that is located at a server, which will then retrieve the fragment of the document required and present that to the client as a complete document.

The XPointers specification combines the best features of both of these approaches. It allows data that conforms to the XML Document Object Model to be queried either at the client, if the resource has been transmitted, or at the server. Because XPointers are defined as structured queries it is also possible to envisage performing part of the retrieval at the server, and part at the client. For example, if the query asks for the second table in first section of a uniquely named chapter, the server could chose to return the whole chapter, the specified section of the chapter or just the table, depending on factors such as current network traffic, server loading, client terminal capabilities, user-stated preferences or knowledge of the user's normal searching techniques. The client could then complete the query to find the subset of the returned data required by the application.

XSL - The Extensible Stylesheet Language

The Extensible Stylesheet Language (XSL) working draft has two independently usable parts:

  1. A language for transforming XML documents
  2. An XML vocabulary for specifying formatting semantics.

An XSL stylesheet specifies how a class of XML documents should be presented to readers by describing how an instance of the class can be transformed into an XML document that uses the formatting vocabulary.

During the transformation process each element in the source document is compared with a set of patternsdefined in the XML-encoded stylesheet. The most detailed pattern match is used to identify whichtemplate should be added to the result tree when processing the element. Templates may contain conditional statements or choices which control the processing of descendants.

The formatting semantics are defined as a set of XML elements and attributes that can be used to describe how the document is to be formatted. The result tree of the transformation process can be defined either in terms of this set of definitions, or in the form of an alternative document presentation language, such as HTML or RTF.

The formatting semantics are split into core and non-core sets. The core XSL formatting objects are page-sequence, simple-page-master, queue, sequence, list,list-item, block, character, rule-graphic, graphic,score, inline-box, block-level-box, page-number,link and link-end-locator. Each of these elements has a number of properties, which are expressed as attributes. XSL sequences allow properties to be shared across a set of formatting objects.

An XSL simple-page-master contains queues for title (of display window), header (of page), footer, start-side margin, end-side margin and the text body areas.

Comparison of XSL and CSS2

Level 2 of the Cascading Style Sheet specification (CSS2) allows a set of formatting properties to be associated with HTML (and XML) elements prior to presentation. It does not, however, permit any transformation of the sequence in which elements are presented to users, which must conform to the order in which the elements are present in the source document.

Many of the properties in the XSL specification have equivalent properties in the CSS specification, as is clearly indicated in the XSL specification. However, not all of the CSS properties have been mapped to XSL. In particular the initial XSL draft specification has none of the properties used by CSS to control the effects of moving a mouse onto an active element. XSL currently contains no facilities for capturing data in forms, or for passing data in an XSL file to other applications. XSL also has none of the CSS2 features for controlling the conversion of text into aural output.

Whilst XSL contains facilities for including and importing sets of stylesheet specifications defined elsewhere, and provides mechanisms for creating user-defined macros, it does not provide a fully cascading set of specifications in the way CSS does. In particular XSL does not contain rules that allow users to override the rules specified by the author of the document. However, XSL has the advantage that its stylesheet specifications cannot be embedded directly into the source documents, which should make it possible for users of the document to maintain control over the presentation of the document.

XML Schema Definitions

Many suggestions for the development of schemas for controlling the structure of XML documents have been proposed since the publication of the first draft of the XML specification. Such proposals have tended to fall into one of two classes:

  1. Proposals for replacing XML document type definitions with XML files (document instances) that serve the same purpose (give or take a few functions)
  2. Proposals that seek to link XML document instances to schemas defined in more than one place.

Early proposals, such as Netscape's Meta-Content Framework using XML and Microsoft's XML-Data, have coalesced to provide two main proposals, theResource Description Framework (RDF) for linking documents to schemas that explain the rules for the creation of parts of XML document instances, and theDocument Content Description (DCD) specification for managing the contents of XML document instances using RDF.

Note: A list of current XML schema languages, including DTDs used to control specific applications, is maintained athttp://www.schema.net.

Resource Description Framework (RDF)

W3C's Resource Description Framework (RDF) Model and Syntax Specification is designed to provide systems with metadata (data about data) describing resources accessible via the Internet. RDF can be used in a variety of application areas, includingresource discovery to provide better search engine capabilities, in cataloging for describing the content and content relationships available at a particular web site, by intelligent software agents to facilitateknowledge sharing and exchange, in content rating, for identifying collections of pages that represent a single logical "document", for describing intellectual property rights, and for expressing privacy preferences.

RDF is based on the concept of classes of information. A collection of classes is called a schema. Classes are organized in a hierarchy, and offer extensibility through subclass refinement.

RDF allows collections of resources to be described as forming containers. RDF defines three types of containers: bags of unordered resources, sequences of ordered resources and alternatives, where one of a set of resources can be referenced.

RDF uses a proposal for the creation of Namespaces in XML that permits specific parts of an RDF definition to be associated with specific web resources, identified using a URI, which contain the relevant definitions.

Document Content Description (DCD)

The Document Content Description for XML (DCD) submission shows how the functions defined in theXML-Data proposal for the description of document structures as XML document instances could be described using a subset of RDF.

DCD only allows for the definition of XML elements, attributes and entities, making no allowance for the notation of an external entity, processing instructions or comments. It does, however, allow datatyping and maximum and minimum permitted values to be associated with both element contents and attribute values, something not allowed for directly in the XML specification.

Linking XML documents to other applications

Two specifications have been defined to simplify the interface between the processors of XML files and applications that wish to use the processed data:

  • W3C have defined a formal Document Object Model (DOM) that can be used to manipulate both HTML and XML data streams
  • the XML Developers Electronic Discussion Group have developed a Simple API for XML (SAX) that allows applications to build generic links to XML processors.

The Document Object Model (DOM)

The Document Object Model Level 1 Specificationprovides a set of functions that are relevant to the manipulation of both HTML and XML files. A DOM processor breaks an XML document instance into a set of nodes whose NodeType property indicates whether it represents a document instance or fragment, an element, an attribute, an entity reference, a comment, a processsing instruction, a string of text or a section of unparsed character data.

The node lists that make up an XML document can be traversed using instructions which allow you to find the first, next, previous or next object in the list, any child nodes, and relations such as the parent node, the first child node, the previous or next sibling, etc. Functions for inserting, removing or replacing nodes from a node list are also provided.

For XML an additional set of functions are provided for the manipulation of information stored in an XML document type definition.

DOM interface bindings have been defined to allow XML documents to be manipulated using the ISO Interface Definition Language (IDL), Java and the ECMAScript scripting language.

Simple API for XML (SAX)

Members of the XML Developers Electronic Discussion Group have defined a Simple API for XML (SAX) that allows them to develop interchangeable XML tools. By designing applications using the SAX interface, developers can integrate the latest tools into their software without changing their applications. This will make it easier to port applications between environments and at the same time will allow applications to take advantage of the latest developments in XML processing technologies.

Information sources for XML

The World Wide Web Consortium (W3C)

W3C maintains a website at which it details current activity related to XML and associated standards. The website includes a page devoted to XML Activity anda page from which you can download the latest versions of specifications and obtain other relevant information on the use of the specification.

Organization for the Advancement of Structured Information Standards (OASIS)

OASIS hosts Robin Cover's extensive listing of new developments in XML as part of The SGML/XML Web Page.

XML.com

Seybold Publications and O'Reilly & Associates, Inc, have helped to set up The XML.Commune which provides access to the relevant specifications and a range of training material on XML.

The World-Wide Web: Recent Developments, The Future & European Industrial Experience

OII Conference report on W3C's 1998 UK Conference.


Section Contents
OII Home Page
OII Index
OII Help

This information set on OII standards is maintained by Martin Bryan of The SGML Centre and Man-Sze Li of IC Focus on behalf of European Commission DGXIII/E.

File last updated: December 1998

Home - Gate - Back - Top - Xmlguide - Relevant