XPointer is a system for addressing components of
XML
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
-based
Internet
The Internet (or internet) is the Global network, global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a internetworking, network of networks ...
media. It is divided among four specifications: a "
framework" that forms the basis for identifying XML fragments, a positional element addressing scheme, a scheme for
namespaces
In computing, a namespace is a set of signs (''names'') that are used to identify and refer to objects of various kinds. A namespace ensures that all of a given set of objects have unique names so that they can be easily identified.
Namespaces ...
, and a scheme for
XPath
XPath (XML Path Language) is an expression language designed to support the query or transformation of XML documents. It was defined by the World Wide Web Consortium (W3C) in 1999, and can be used to compute values (e.g., strings, numbers, or ...
-based addressing. XPointer Framework is a
W3C
The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working together in ...
recommendation since March 2003.
The XPointer language is designed to address structural aspects of XML, including text content and other information objects created as a result of
parsing
Parsing, syntax analysis, or syntactic analysis is a process of analyzing a String (computer science), string of Symbol (formal), symbols, either in natural language, computer languages or data structures, conforming to the rules of a formal gramm ...
the document. Thus, it could be used to point to a section of a document highlighted by a user through a mouse drag action.
During development, and until 2016, XPointer was covered by a royalty-free technology
patent
A patent is a type of intellectual property that gives its owner the legal right to exclude others from making, using, or selling an invention for a limited period of time in exchange for publishing an sufficiency of disclosure, enabling discl ...
held by
Sun Microsystems
Sun Microsystems, Inc., often known as Sun for short, was an American technology company that existed from 1982 to 2010 which developed and sold computers, computer components, software, and information technology services. Sun contributed sig ...
.
Positional element addressing
The
element()
scheme
introduces positional addressing of child elements. This is similar to a simple XPath address, but subsequent steps can only be numbers representing the position of a descendant relative to its branch on the tree.
For instance, given the following fragment:
results as the following examples:
xpointer(id("foo")) => foobar
xpointer(/foobar/1) => bar
xpointer(//bom) => bom (a=1), bom (a=2)
element(/1/2/1) => bom (a=1) (/1 descend into first element (foobar),
/2 descend into second child element (baz),
/1 select first child element (bom))
See also
*
URI fragment
*
HTML
Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
*
HyTime
HyTime (''Hypermedia/Time-based Structuring Language'') is a markup language that is an application of SGML. HyTime defines a set of hypertext-oriented element types that, in effect, supplement SGML and allow SGML document authors to build hypert ...
*
Text Encoding Initiative Guidelines
*
XML
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
References
External links
XPointer FrameworkNamespacingPath based addressingOpen source implementation (CognitiveWeb)GPL License .NET implementation (XInclude.NET)*
Method and system for implementing hypertext scroll attributes' on Google Patents, expired 2016-02-01
{{DEFAULTSORT:Xpointer
World Wide Web Consortium standards
XML data access