XPointer: Difference between revisions

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
imported>Sammi Brie
Importing Wikidata short description: "System for addressing components of XML-based Internet media"
 
imported>Bender the Bot
m External links: HTTP to HTTPS for SourceForge
 
Line 72: Line 72:
* [http://www.w3.org/TR/xptr-xpointer/ Path based addressing]
* [http://www.w3.org/TR/xptr-xpointer/ Path based addressing]
* [http://lists.w3.org/Archives/Public/www-xml-linking-comments/2000OctDec/0092.html XPointer patent terms and conditions]
* [http://lists.w3.org/Archives/Public/www-xml-linking-comments/2000OctDec/0092.html XPointer patent terms and conditions]
* [http://sourceforge.net/projects/cweb Open source implementation (CognitiveWeb)]
* [https://sourceforge.net/projects/cweb Open source implementation (CognitiveWeb)]
* [http://mvp-xml.sourceforge.net/xinclude/ GPL License .NET implementation (XInclude.NET)]
* [https://mvp-xml.sourceforge.net/xinclude/ GPL License .NET implementation (XInclude.NET)] {{Webarchive|url=https://web.archive.org/web/20150618032805/http://mvp-xml.sourceforge.net/xinclude/ |date=2015-06-18 }}
* ''[https://patents.google.com/patent/US5659729A/en Method and system for implementing hypertext scroll attributes]'' on Google Patents, expired 2016-02-01
* ''[https://patents.google.com/patent/US5659729A/en Method and system for implementing hypertext scroll attributes]'' on Google Patents, expired 2016-02-01



Latest revision as of 04:25, 11 August 2025

Template:Short description Template:Infobox technology standard

XPointer is a system for addressing components of XML-based Internet 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, and a scheme for XPath-based addressing. XPointer Framework is a W3C recommendation since March 2003.[1][2]

The XPointer language is designed to address structural aspects of XML, including text content and other information objects created as a result of parsing 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 held by Sun Microsystems.[3]

Positional element addressing

The element() scheme[4] 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:

<foobar id="foo">
  <bar/>
  <baz>
    <bom a="1"/>
  </baz>
  <bom a="2"/>
</foobar>

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

References

Template:Reflist

External links

Template:W3C Standards Template:Authority control

  1. Cite error: Invalid <ref> tag; no text was provided for refs named W3C-xptr-framework
  2. Script error: No such module "citation/CS1".
  3. Script error: No such module "citation/CS1".
  4. Script error: No such module "citation/CS1".