ZVON > >
Prev | Next |

18. range vs. range-inside: point

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

Description

Here the results are identical. The range function returns ranges covering the locations in the argument location-set. For each location x in the argument location-set, a range location representing the covering range of x is added to the result location set. The range-inside function returns ranges covering the contents of the locations in the argument location-set.




Range function
For a point location, the start and end points of the covering range are the point itself.
XPointer: xpointer(range(start-point(string-range(//*,'another'))))

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


Range-inside function
If the argument is not a range, than it is used as a container location of the start- and end-points of the resulting range. Here the container is start-point(string-range(//*,'another')).
XPointer: xpointer(range-inside(start-point(string-range(//*,'another'))))

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