ZVON > >
Prev | Next |

9. Definition of point location: node-point

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

Description

A location of type point is defined by a node, called the container node (node which contains the point), and a non-negative integer, called the index.




Node-point
An index of zero indicates the point before any child nodes.
XPointer: xpointer(start-point(//AAA))
XPointer (alternative): xpointer(start-point(range(//AAA/BBB[1])))

 <AAA>X
   <BBB bbb="111">
     Text in the first element BBB.</BBB>
   <BBB 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)


Node-point
A non-zero index n indicates the point immediately after the nth child node.
XPointer: xpointer(end-point(range(//AAA/BBB[2])))
XPointer (alternative): xpointer(start-point(range(//AAA/CCC)))

 <AAA>
   <BBB bbb="111">
     Text in the first element BBB.</BBB>
   <BBB bbb="222">
     Text in another element BBB.
     <DDD ddd="999">
       Text in more nested element.</DDD>
   </BBB>X
   <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