ZVON > >
Prev | Next |

6. Form of XPointer: short (bare name)

This tutorial is obsolete. Please, use the new one.

Description

The specification defines one full form and two shorthand forms (which are abbreviations of the full one).




Shorthand XPointer expression - bare names
If your elements have an ID-type attribute, you can address them directly using the value of the ID-type attribute. (Don't forget: you must have an attribute defined as an ID type in your DTD!) The example below selects node with id("b1").
XPointer: b1
XPointer (alternative): xpointer(id("b1"))

 <AAA>
   <BBB myid="b1" bbb="111">
     Text in the first element BBB.</BBB>
   <BBB myid="b2" bbb="222">
      Text in another element BBB.
     <DDD ddd="999">
       Text in more nested element.</DDD>
   </BBB>
   <CCC ccc="123" xxx="321">
     Again some text in some element.</CCC>
 </AAA>
  • X marks point (zero width)
  • This style marks the container node.
  • This style marks resulting locations.
  • X marks collapsed range (zero width)



_____________________________________________
Reference Search | Sitemap | XML Glossary       ZVON | Systinet




Related sites:
  • dotNet Slackers - Your latest resource for ASP.NET
  • Dotnet Spider - Outsourcing and Offshore software development in India
  • XML - Xselerator, XSL Editor, BizTalk Utilities, XML Tutorials, Learn XML
  • Planet Source Code - The largest public source code database on the Internet
answering service VoIP Internettelefonie DSL, SDSL, ADSL