net.sf.saxon.value
public class QNameValue extends AtomicValue
Constructor Summary | |
---|---|
QNameValue(NamePool namePool, int nameCode)
Constructor | |
QNameValue(String prefix, String uri, String localName, NameChecker checker)
Constructor. |
Method Summary | |
---|---|
int | allocateNameCode(NamePool pool)
Allocate a nameCode for this QName in the NamePool |
static AtomicValue | castToQName(StringValue operand, AtomicType targetType, StaticContext env)
Create a QName value (possibly a DerivedAtomicValue derived from QName) from
a string literal, given a namespace context |
AtomicValue | convertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context)
Convert to target data type |
Object | convertToJava(Class target, XPathContext context)
Convert to Java object (for passing to external functions) |
boolean | equals(Object other)
Determine if two QName values are equal. |
String | getClarkName()
Get the name in Clark notation, that is {uri}local |
AtomicValue | getComponent(int part)
Get a component. |
ItemType | getItemType(TypeHierarchy th)
Return the type of the expression |
String | getLocalName()
Get the local part |
String | getNamespaceURI()
Get the namespace part (null means no namespace) |
String | getPrefix()
Get the prefix |
String | getStringValue()
Get the string value as a String. |
int | hashCode() |
Object | makeQName(Configuration config)
Temporary method to construct a javax.xml.namespace.QName without actually mentioning it
by name (because the class is not available in JDK 1.4) |
String | toString()
The toString() method returns the name in the form QName("uri", "local") |
Parameters: namePool The name pool containing the specified name code nameCode The name code identifying this name in the name pool
Parameters: prefix The prefix part of the QName (not used in comparisons). Use null or "" to represent the default prefix. uri The namespace part of the QName. Use null or "" to represent the null namespace. localName The local part of the QName checker NameChecker used to check the name against XML 1.0 or XML 1.1 rules. Supply null if the name does not need to be checked (the caller asserts that it is known to be valid)
Parameters: pool the NamePool to be used
Returns: the allocated nameCode
Parameters: operand the input string targetType the type required: QName, or a type derived from QName or NOTATION env the static context, including the namespace context
Returns: the value after conversion
Throws: XPathException if the name is lexically invalid or uses an undeclared prefix
Parameters: requiredType an integer identifying the required atomic type context
Returns: an AtomicValue, a value of the required type; or an ErrorValue
Throws: ClassCastException if they are not comparable IllegalStateException if the two QNames are in different name pools
Parameters: part either Component.LOCALNAME or Component.NAMESPACE indicating which component of the value is required
Returns: either the local name or the namespace URI, in each case as a StringValue
Parameters: th
Returns: Type.QNAME (always)
Returns: the name in in the form QName("uri", "local")