For faster navigation, this Iframe is preloading the Wikiwand page for XPointer.

XPointer

XPointer je metoda adresování komponent XML souborů. Jedná se o zobecnění identifikátoru fragmentu známého z HTML odkazů, kde <a href="http://www.domena.top/cesta/dokument.html#jmeno_casti"> se odkazuje na element s id="jmeno_casti" v dokument.html.

XPointer slouží pro výběr části XML dokumentu. Je navržen tak, aby vyhovoval struktuře XML, včetně textového obsahu a jiných informačních objektů, které vzniknou při analýze dokumentu. XPointer používá 3 schémata: element() pro poziční výběru elementu; xmlns() pro jmenné prostory a xpointer() pro adresování ve stylu XPath.

XPointer je krytý bezplatným technologickým patentem, který vlastnila firma Sun Microsystems[1].

XPointer tvoří čtyři standardy:

  • „framework“ tvoří základ pro identifikaci XML fragmentů[2]
  • poziční schéma adresování prvků[3]
  • schéma pro jmenné prostory[4]
  • schéma pro adresování založené na XPath[5]

XPointer Framework je doporučení vydané v březnu 2003[6] [7].

Poziční adresování elementů

[editovat | editovat zdroj]

Schéma element() poskytuje poziční adresování vnořených elementů podobné jednoduchým XPath adresám, ale následujícími kroky mohou být pouze čísla reprezentující pořadí vnořeného elementu v příslušné větvi stromu.

Pro následující fragment:

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

jsou výsledky použití XPointer následující:

 xpointer(id("foo")) => foobar
 xpointer(/foobar/1) => bar
 xpointer(//bom) => bom (a=1), bom (a=2)
 element(/1/2/1) => bom (a=1) (/1 sestoupí do prvního prvku (foobar),
                               /2 sestoupí do druhého dítěte (baz),
                               /1 vybere první dítě (bom))

V tomto článku byl použit překlad textu z článku XPointer na anglické Wikipedii.

  1. XPointer royalty-free patent statement
  2. XPointer Framework
  3. Poziční adresování prvků
  4. Namespacing
  5. Adresování vycházející z XPath
  6. XPointer Framework [online]. Dostupné online. 
  7. XML and Semantic Web W3C Standards Timeline [online]. [cit. 2014-10-23]. Dostupné v archivu pořízeném dne 2013-04-24. 

Související články

[editovat | editovat zdroj]

Externí odkazy

[editovat | editovat zdroj]
{{bottomLinkPreText}} {{bottomLinkText}}
XPointer
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?