Class com.ibm.xml.xpointer.RelTermAttribute
java.lang.Object
|
+----com.ibm.xml.xpointer.RelTermAttribute
- public class RelTermAttribute
- extends java.lang.Object
- implements java.io.Serializable
The RelTermAttribute class provides support for attribute qualifiers to elements which
are candidates for relative location terms in XPointers. Refer to RelTerm for details
on how relative location terms are specified.
Attribute qualifiers consist of two parts:
- Attr
- This is the name of the attribute qualifier. It can be specified in two ways:
- *: Matches any attribute name. For example, the following location term
selects the first child of the location source for which the attribute
TARGET
has a value: child(1,#element,TARGET,*)
- Name: Matches the specified case-insensitive attribute name.
For example, the following location term selects the first child with an
N
attribute having the value 2 is chosen; then that element's first child element having
the value 1 for the same attribute is chosen: child(1,#element,N,2).(1,#element,N,1)
- Value
- This is the value of the attribute qualifier. It can be specified in four ways:
- #IMPLIED: Matches an unspecified, or defaulted, value. For example,
the following location term selects the first child of the location source that is
an
FS
element for which the RESP
attribute has been left
unspecified: child(1,FS,RESP,#IMPLIED)
- *: Matches any value, including defaulted.
- Name: Matches the specified case-insensitive attribute value.
- "Name": Matches the specified case-sensitive attribute value.
- Version:
- Revision: 78 1.4 src/com/ibm/xml/xpointer/RelTermAttribute.java, xml4jsrc, xml4j-jtcsv, xml4j_1_0_4
- See Also:
- RelTerm, XPointer
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RelTermAttribute
public RelTermAttribute(java.lang.String attr,
int valueType,
java.lang.String value)
- Constructor.
- Parameters:
attr
- Name of this attribute qualifier. Specify *
to match
any name.
valueType
- One of: XPointer.T_IMPLIED, T_ANY, T_NAME, T_EXACT
value
- Value of this attribute qualifier. Specify #IMPLIED
to match defaulted values. Specify *
to match any
value. Case-sensitive values should be specified without quotes.
getName
public java.lang.String getName()
- Returns this attribute qualifier's name.
- Returns:
- Name of this attribute qualifier.
getValueType
public int getValueType()
- Returns this attribute qualifier's value type.
- Returns:
- One of: XPointer.T_IMPLIED, T_ANY, T_NAME, T_EXACT
getValue
public java.lang.String getValue()
- Returns this attribute qualifier's value.
- Returns:
- Value of this attribute qualifier. Case sensitive values will not
contain surrounding quotes.
toString
public java.lang.String toString()
- Returns this attribute qualifier in the form of either:
,attr,#IMPLIED
,attr,*
,attr,name
,attr,"name"
- Returns:
- A string represention of this attribute qualifier. Note: This is
not a standalone location term.
- Overrides:
- toString in class java.lang.Object
- See Also:
- com.ibm.xml.XPointer.toString