XPointer

XPointer and XML Pointer Language is one of the World Wide Web Consortium (W3C ) developed query language for addressing parts of an XML document. It is an extension of the XPath specification, the can also addressing parts of an XML document.

XPointer allows in particular to refer to a URI to parts of an XML document. After the original XPointer definition was implemented only slowly, the W3C decided to split the definition into multiple documents.

Simple references

Simple references are similar to local links in HTML documents. They refer to XML elements that are identified by an ID. For example, consider an XLink. The "Rudolph " is actually the XPointer. The link points to the element with the ID " Rudolph " in the " Brief.xml " file:

Xlink: href = " # Brief.xml Rudolph" Simple references belong to the shorthand notation of XPointer and specified in XPointer Framework. There are also the basis for more complex XPointer be created in scheme- based notation.

The element () scheme

With the element () scheme, references can be created on certain children in the tree structure of an XML document. The XLink the following example points to the second sub-element of the first ( root ) element in the XML document " index.xml ":

Xlink: href = " index.xml # element ( / 1 /2) " The xpointer () scheme

Any complex references to parts of XML documents can be created with the xpointer () scheme. This can be used to address the desired parts of the document, an XPath expression. In addition, there are other options that are not provided in XPath:

  • Points before or after XML structure elements (start -point (), end -point ( ), ...)
  • Areas between XML structure elements ( range (), range -to ( ), ...)
  • Selected Areas in free-text (string - range (), ...)

The following example returns the 1st to the 4th element of the type " page " within the element " MobyDick " in the file " Bücherregal.xml ":

Xlink: href = " # Bücherregal.xml xpointer ( / MobyDick / page [position ( ) = 1] / range -to ( / MobyDick / page) ) " The text from the pound sign ( # ) is the actual XPointer again. In the scheme- based notation as many XPointer expressions can be written consecutively. Result of the expression is the result of the first sub- expression which returns a result. example:

Element ( / 1/4) xpointer ( / / book ) Web Links

  • XPointer Framework Part 1 of the XPointer specification - simple references
  • XPointer element () Scheme Part 2 of the XPointer specification - element () scheme
  • XPointer xpointer () Schema Part 3 of the XPointer specification - xpointer () scheme
  • XPointer xmlns () Scheme Part 4 of the XPointer specification - Namespaces

World Wide Web Consortium (W3C )

Canonical XML • CSS • CDF • DOM • Geolocation API • HTML • ITS • • OWL MathML P3P • • PLS • PNG • • RDF RDF Schema SISR • • • SKOS SMIL • SOAP • SRGS, SSML • • • SPARQL SVG • Timed Text • Turtle • VoiceXML • WSDL • XFormsXHTML • XHTML RDFa • XInclude • XLink • XML • XML Base • XML Encryption • XML Events • XML Information Set • XML namespace • XML Schema • XML Signature • XPath • XPointer • XProc • • XQuery XSL XSL-FO • • XSLT ( elements )

• CCXML CURIEHTML5InkML • RIF • SCXML • SMIL Timesheets • sXBL WICD • • • XFDL XFrames • XBL • XHTML MathML SVG • XMLHttpRequest

XAdES • XHTML SMIL • XUP

Web Content Accessibility Guidelines • Multimodal Interaction Activity • Markup Validation Service

Web Accessibility Initiative

  • XML
831285
de