dcsimg
RealTime IT News

New XPointer Spec Labels Parts of XML Docs

After years of work, the World Wide Web Consortium (W3C) Tuesday gave a thumbs up to XML Pointer Language (XPointer), providing a way to identify and point to segments of an XML document.

The W3C XPointer Recommendation encompasses three specifications:

  • XPointer Framework, which, according to W3C, "provides a lightweight extensible model for identifying parts of XML documents"
  • XPointer element() Scheme, which allows users to point to specific elements in XML documents and data
  • XPointer xmlns() Scheme, which uses XML Namespaces to give XPointer Framework a way to avoid name collisions between schemes and provide namespace binding information for use within other schemes.

The XML Linking Working Group, which produced the specifications, is also working on the XPointer xpointer() Scheme, which seeks to provide the XPointer Framework with a high level of functionality for addressing portions of XML documents. Based on XML Path Language 1.0 (XPath), the scheme supports addressing into the internal structures of XML documents and external parsed entities. It allows for examination of a document's hierarchical structure and choice of portions based on various properties, such as element types, attribute values, character content, and relative position. In particular, it provides for specific reference to elements, character strings, and other XML information, whether or not they bear an explicit ID attribute.

The various XPointer specifications aim to provide a more robust linking solution than "id," a feature of XML 1.0 which gave authors a method to identify specific parts of XML documents in conjunction with anchors and other XML elements. But id only allowed authors of the document to formally identify parts of that document, meaning other users could not choose to identify a particular section or fragment.

The XPointer Framework establishes a set of basic syntax rules for identifying parts or fragments of XML. With it, authors can still use ids as pointers into XML documents and data, but the specification also allows users to create and reference their own schemes for identifying XML fragments.

Meanwhile XPointer element() Scheme allows users to make pointers from elements, enabling the use of both ids and a list of "pointer-parts." Pointer-parts are numerical and text expressions which guide a software processor to a precise XML fragment.

Because XPointer schemes are independently developed, the XPointer xmlns() Scheme is needed to distinguish one scheme from another. Even if the same name is used in two or more XPointer schemes, the xmlns scheme allows a processor to tell the difference and process the XPointer correctly.

The XML Linking Working Group consists of members from AOL/Netscape Communications, Arbortext, Fujitsu, Microsoft, Oracle, Reuters, Sun Microsystems, the University of Edinburgh and the University of Southhampton.