Questions tagged [xpointer]

XPointer uses XPath expressions to navigate an XML document to target XLink hyperlinks at specific parts of an XML document.

XPointer is divided among four specifications: a framework which forms the basis for identifying fragments, a positional element addressing scheme, a scheme for namespaces, and a scheme for XPath-based addressing. XPointer Framework is a 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 the document. Thus, it could be used to point to a section of a document highlighted by a user through a mouse drag action.

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:

<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))

External links

28 questions
2
votes
1 answer

Inheritance of entities in docbook files

I am having some problems referencing some text from my xml files. I have some xml documents (docbook 5.0 documents). They all include a specific part from another xml file like this:
1
vote
1 answer

Can XPointer "follow" links?

I know I can specify a node another document using XPointer: http://www.google.com/#xpointer(...) But, can I specify an a/@href node in the current document, and point to a node in that document?
Zachary Vance
  • 752
  • 4
  • 18
1
vote
0 answers

Sign XML with particular xpointer reference Java

I need to sign an XML document with the following reference URI in Java: xpointer(//*[@authenticate='true']) So I try to sign it using this reference: Reference ref = fac.newReference ("#xpointer(//*[@authenticate='true'])",…
Thomas Rollet
  • 1,573
  • 4
  • 19
  • 33
1
vote
2 answers

Include child elements with xpointer element() scheme

I am trying to include all child elements (sections) of an element from a.xml into b.xml with xi:include. Both XML files are valid docbook 5 files. a.xml
section 1
Paul
  • 2,474
  • 7
  • 33
  • 48
1
vote
1 answer

What's the point (no-pun) of XPointer ranges?

XPointer spec talks about ranges that, as far as I understand, mean you can target two nodes in an XML document and get everything in between them or something. Do people really use this? What is it useful for?
Ollie Saunders
  • 7,787
  • 3
  • 29
  • 37
1
vote
1 answer

how to use xpointer to link to specific node from another document

I have two xml files. and I want to refer the value of a node from the other xml file. example: 1.xml Gambardella, Matthew XML Developer's Guide
1
vote
1 answer

Xpointer is a non valid IRI?

I'm trying out a tool (Elda) that uses the Jena framework for handling RDF. I got this error: ERROR [qtp1415899750-24] (RouterRestlet.java:332) - Exception: Line 7, column 72: com.hp.hpl.jena.iri.impl.IRIImplException: Code:…
0
votes
3 answers

what use does xslt,xpath,xlink,xpointer,dtd have in the real world of application building

I am studying all that i can about web services such as soap and found some of the xml displayed on some tutorials hard to understand so i decided to learn from the ground up to make sense of things. xml i already understand so then i saw xpath,…
Exploit
  • 6,278
  • 19
  • 70
  • 103
0
votes
2 answers

How to make geometry topology via XML and XSD?

I need to find the way of defining lines using topology representation. Now i have something similar to it: 1 5379847.689
0
votes
1 answer

Xpointer: is it possible to select an empty node-set?

Question I have an XInclude that includes a node-set resulting from the specified xpointer attribute's expression. Is it possible to select, with the xpointer, an empty node-set, so to not include anything? Issue The reason is that my xincluded &…
Kamafeather
  • 8,663
  • 14
  • 69
  • 99
0
votes
0 answers

Linking with Xlink to "#link"?

In HTML if i want to do a link, i write: ... To do an anchor i write: ... And to do a link i write: ... But with SVG (and so with XLINK,…
Borja
  • 3,359
  • 7
  • 33
  • 66
0
votes
1 answer

Is there a "standard" way to validate xpointers?

I'm looking to validate the xpointers (shorthand) in one xml document, that means that all ids in the referenced document are present. By standard I mean something already built-in in the XSL transformation engines. example: document 1:
Vlax
  • 1,447
  • 1
  • 18
  • 24
0
votes
1 answer

XPath with FilePath

Is there any standard (or practical) notation for expressing filepath and xpath together? Such as... xml.xml:///a/b/c I believe I saw somewhere else but I can't find the page. [UPDATE] I think I'm asking about XPointer. :)
Jin Kwon
  • 20,295
  • 14
  • 115
  • 184
1
2