|
XML for Java Compatibility API 2.0.11 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.xml.xpointer.XPointer
The XPointer class provides support for addressing into the internal structures of XML documents as defined by WD-xptr-19980303.
An XPointer consists of a series of location terms, each of which specifies a location,
usually relative to the location specified by the prior location term. Each location term
has a keyword (such as id, child, ancestor, and so on) and can have arguments such as an
instance number, element type, or attribute. For example, the location term child(2,CHAP)
refers to the second child element whose type is CHAP
.
Location terms are classified into absolute terms, relative terms, span terms, attribute terms, and string data terms. An absolute term selects one or more elements or locations in an XML document without reference to any other sub-resource location. A relative or string data term specifies a location in terms of another location, called the location source . The location source is the entire resource if there are no preceding location terms; otherwise it is the location specified by the preceding term (which might be relative to a location term before that).
AbsTerm
,
RelTerm
,
SpanTerm
,
AttrTerm
,
StringTerm
, Serialized FormField Summary | |
static java.lang.String[] |
literals
|
static java.lang.String[] |
nodetypes
|
static int |
NT_ALL
|
static int |
NT_CDATA
|
static int |
NT_COMMENT
|
static int |
NT_ELEMENT
|
static int |
NT_NAME
|
static int |
NT_NONE
|
static int |
NT_PI
|
static int |
NT_TEXT
|
static java.lang.String |
S_ALL
|
static java.lang.String |
S_CDATA
|
static java.lang.String |
S_COMMENT
|
static java.lang.String |
S_ELEMENT
|
static java.lang.String |
S_END
|
static java.lang.String |
S_IMPLIED
|
static java.lang.String |
S_NIMPLIED
|
static java.lang.String |
S_PI
|
static java.lang.String |
S_TEXT
|
static int |
ST_ANCESTOR
|
static int |
ST_ATTR
|
static int |
ST_CHILD
|
static int |
ST_DESCENDANT
|
static int |
ST_FOLLOWING
|
static int |
ST_FSIBLING
|
static int |
ST_HTML
|
static int |
ST_ID
|
static int |
ST_NONE
|
static int |
ST_ORIGIN
|
static int |
ST_PRECEDING
|
static int |
ST_PSIBLING
|
static int |
ST_ROOT
|
static int |
ST_SPAN
|
static int |
ST_STRING
|
static int |
T_ANY
|
static int |
T_EXACT
|
static int |
T_IMPLIED
|
static int |
T_NAME
|
Constructor Summary | |
XPointer(AbsTerm absTerm,
java.util.Vector otherTerms)
Constructor. |
Method Summary | |
void |
appendOtherTerm(OtherTerm otherTerm)
Appends the specified otherTerm to the end of the other terms for this XPointer. |
AbsTerm |
getAbsTerm()
Returns the absolute location term of this XPointer. |
java.util.Vector |
getOtherTermsVector()
Returns a Vector of Relterm, SpanTerm, AttrTerm, and StringTerm items which comprise the other terms of this XPointer. |
void |
insertOtherTerm(OtherTerm otherTerm)
Inserts the specified otherTerm to the beginning of the other terms for this XPointer. |
static XPointer |
makeXPointer(Child targetNode)
Returns an XPointer instance representing the specified targetNode. |
Pointed |
point(org.w3c.dom.Document document)
Returns the locations in the specified document that are satisfied by this XPointer. |
Pointed |
point(org.w3c.dom.Node originNode)
Returns the locations in the specified originNode that are satisfied by this XPointer. |
OtherTerm |
removeLastOtherTerm()
Returns and removes the OtherTerm at the end of this XPointer. |
void |
setAbsTerm(AbsTerm absTerm)
Sets the absolute location term of this XPointer. |
java.lang.String |
toString()
Returns this XPointer in the form of either: absoluteTerm
absoluteTerm.otherTerm
absoluteTerm.otherTerm.otherTerm...
otherTerm
otherTerm.otherTerm...
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String S_ALL
public static final java.lang.String S_END
public static final int NT_NONE
public static final int NT_NAME
public static final int NT_ELEMENT
public static final int NT_PI
public static final int NT_COMMENT
public static final int NT_TEXT
public static final int NT_CDATA
public static final int NT_ALL
public static final java.lang.String[] nodetypes
public static final java.lang.String S_ELEMENT
public static final java.lang.String S_PI
public static final java.lang.String S_COMMENT
public static final java.lang.String S_TEXT
public static final java.lang.String S_CDATA
public static final java.lang.String S_NIMPLIED
public static final java.lang.String S_IMPLIED
public static final java.lang.String[] literals
public static final int ST_NONE
public static final int ST_ROOT
public static final int ST_ORIGIN
public static final int ST_ID
public static final int ST_HTML
public static final int ST_CHILD
public static final int ST_DESCENDANT
public static final int ST_ANCESTOR
public static final int ST_PRECEDING
public static final int ST_PSIBLING
public static final int ST_FOLLOWING
public static final int ST_FSIBLING
public static final int ST_SPAN
public static final int ST_ATTR
public static final int ST_STRING
public static final int T_IMPLIED
public static final int T_ANY
public static final int T_NAME
public static final int T_EXACT
Constructor Detail |
public XPointer(AbsTerm absTerm, java.util.Vector otherTerms)
absTerm
- Absolute term of XPointer. Specification of null
is allowed.otherTerms
- A vector of OtherTerm instances. Specification of null
is allowed.AbsTerm
,
OtherTerm
Method Detail |
public AbsTerm getAbsTerm()
null
if no absolute term.setAbsTerm(com.ibm.xml.xpointer.AbsTerm)
,
AbsTerm
public void setAbsTerm(AbsTerm absTerm)
absTerm
- This XPointer's absolute location term, or null
if no absolute term.getAbsTerm()
,
AbsTerm
public java.util.Vector getOtherTermsVector()
RelTerm
,
AttrTerm
,
StringTerm
,
SpanTerm
,
OtherTerm
,
appendOtherTerm(com.ibm.xml.xpointer.OtherTerm)
,
insertOtherTerm(com.ibm.xml.xpointer.OtherTerm)
,
removeLastOtherTerm()
public void appendOtherTerm(OtherTerm otherTerm)
otherTerm
- The RelTerm, AttrTerm, StringTerm, or SpanTerm to be appended.RelTerm
,
AttrTerm
,
StringTerm
,
SpanTerm
,
OtherTerm
,
getOtherTermsVector()
,
insertOtherTerm(com.ibm.xml.xpointer.OtherTerm)
,
removeLastOtherTerm()
public void insertOtherTerm(OtherTerm otherTerm)
otherTerm
- The RelTerm, AttrTerm, StringTerm, or SpanTerm to be inserted.RelTerm
,
AttrTerm
,
StringTerm
,
SpanTerm
,
OtherTerm
,
getOtherTermsVector()
,
appendOtherTerm(com.ibm.xml.xpointer.OtherTerm)
,
removeLastOtherTerm()
public OtherTerm removeLastOtherTerm()
RelTerm
,
AttrTerm
,
StringTerm
,
SpanTerm
,
OtherTerm
,
getOtherTermsVector()
,
appendOtherTerm(com.ibm.xml.xpointer.OtherTerm)
,
insertOtherTerm(com.ibm.xml.xpointer.OtherTerm)
public java.lang.String toString()
absoluteTerm
absoluteTerm.otherTerm
absoluteTerm.otherTerm.otherTerm...
otherTerm
otherTerm.otherTerm...
AbsTerm.toString()
,
RelTerm.toString()
,
AttrTerm.toString()
,
StringTerm.toString()
,
SpanTerm.toString()
public Pointed point(org.w3c.dom.Document document)
origin()
html()
span()
string()
document
- TXDocument instance to be examined.Pointed
,
Document
public Pointed point(org.w3c.dom.Node originNode)
span()
string()
originNode
- Node instance to be examined.Pointed
,
Child
public static XPointer makeXPointer(Child targetNode)
targetNode
- Node to be represented as an XPointer.Child.makeXPointer()
|
XML for Java Compatibility API 2.0.11 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |