Class com.ibm.xml.xpointer.SpanTerm
java.lang.Object
|
+----com.ibm.xml.xpointer.SpanTerm
- public class SpanTerm
- extends java.lang.Object
- implements OtherTerm, java.io.Serializable
The SpanTerm class provides support for span location terms in XPointers.
Many XPointers locate individual nodes in an element tree. However, some location terms
can locate more complex sets of data. For example, a string match may locate only a
portion of a node, and an XPointer containing the span location term (called a spanning
XPointer) can reference sub-resources that do not constitute whole elements.
The span term has the single keyword span
which locates a sub-resource starting
at the beginning of the data selected by its first argument and continuing through to the
end of the data selected by its second argument. Both arguments are interpreted relative
to the location source for the spanning location term itself; the second argument does not
use the first argument as its location source.
Following is an example of a spanning XPointer that selects the first through third
children of the element with ID a23
: id(a23).span(child(1),child(3))
- Version:
- Revision: 79 1.4 src/com/ibm/xml/xpointer/SpanTerm.java, xml4jsrc, xml4j-jtcsv, xml4j_1_0_4
- See Also:
- XPointer, OtherTerm
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpanTerm
public SpanTerm(XPointer xbegin,
XPointer xend)
- Constructor.
- Parameters:
xbegin
- The XPointer which denotes the start of the sub-resource to be selected.
xend
- The XPointer which denotes the end of the sub-resource to be selected.
getBeginning
public XPointer getBeginning()
- Returns the XPointer which denotes the start of the selected sub-resource.
- Returns:
- The start of the selected sub-resource.
- See Also:
- getEnd
getEnd
public XPointer getEnd()
- Returns the XPointer which denotes the end of the selected sub-resource.
- Returns:
- The end of the selected sub-resource.
- See Also:
- getEnd
toString
public java.lang.String toString()
- Returns this span term in the form of
span(xbegin,xend)
.
- Returns:
- A string represention of this span term.
- Overrides:
- toString in class java.lang.Object