com.ibm.xml.xpointer
Class AttrTerm
java.lang.Object
|
+--com.ibm.xml.xpointer.AttrTerm
- public class AttrTerm
- extends java.lang.Object
- implements OtherTerm
The AttrTerm class provides support for attribute location terms in XPointers.
Absolute and relative location terms have as their target one or more elements. In order
to allow attributes within an element to be the target of an XPointer, the attribute location
term is provided.
An attribute 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).
The attribute term has the single keyword attr
which takes only an
attribute name as a selector and returns the attribute's value.
Following is an example of an attribute XPointer that returns the value of the attribute
named department
of the element with ID a23
: id(a23).attr(department)
- Version:
- Revision: 16 1.4 src/com/ibm/xml/xpointer/AttrTerm.java, parser, xml4j2, xml4j2_0_11
- See Also:
XPointer
,
OtherTerm
Constructor Summary |
AttrTerm(java.lang.String name)
Constructor. |
Method Summary |
java.lang.String |
getName()
Returns the name of the attribute in this attribute term. |
java.lang.String |
toString()
Returns this attribute term in the form of attr(name) . |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
AttrTerm
public AttrTerm(java.lang.String name)
- Constructor.
- Parameters:
name
- Name of the attribute in this attribute term.
getName
public java.lang.String getName()
- Returns the name of the attribute in this attribute term.
- Returns:
- Name of the attribute in this attribute term.
toString
public java.lang.String toString()
- Returns this attribute term in the form of
attr(name)
.
- Returns:
- A string represention of this attribute term.
- Overrides:
- toString in class java.lang.Object