ZVON > >
Prev | Next |

17. range vs. range-inside: range

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 range location, the covering range is identical to the range.
XPointer: xpointer(range(string-range(//*,'another')))

 <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>
   <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 of the range-inside function is a range, than this range is added to the resulting location set.
XPointer: xpointer(range-inside(string-range(//*,'another')))

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