xpointer
Class XPRange

java.lang.Object
  |
  +--xpointer.XPRange

public class XPRange
extends java.lang.Object


Constructor Summary
XPRange()
          Creates new XPRange
 
Method Summary
 org.w3c.dom.ranges.Range getRange(Location location)
          Creates a range from the given generic location.
 org.w3c.dom.ranges.Range getRange(org.w3c.dom.Node node)
          Creates a range from the given node.
 org.w3c.dom.ranges.Range getRange(org.w3c.dom.ranges.Range range)
          Creates a range from a given range.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPRange

public XPRange()
Creates new XPRange
Method Detail

getRange

public org.w3c.dom.ranges.Range getRange(Location location)
Creates a range from the given generic location.
Parameters:
location - the location passed as argument of the range function
Returns:
the range corresponding to the given location

getRange

public org.w3c.dom.ranges.Range getRange(org.w3c.dom.Node node)
Creates a range from the given node. The range covers the given node. For the root node, the containter of the start point and end point of the returned range is the root node; the index of the start point of the range is zero; and the index of the end point of the range is the number of children of the root node. For an attribute node, the container node of the start point and end point of the returned range is the attribute node; the index of the start-point of the range is zero; and the index of the end point of the range is the length of the string-value of the attribute node. For any other kind of node, the container node to the start point and end point of the returned range is the parent of the node; the index of the start point of the range is the number of preceding sibling nodes of the given node; and the index of the end point is one greater than the index of the start point.
Parameters:
node - the node
Returns:
the range corresponding to the given node

getRange

public org.w3c.dom.ranges.Range getRange(org.w3c.dom.ranges.Range range)
Creates a range from a given range. The covering range is identical to the given range.
Parameters:
range - the given range
Returns:
the same range