net.sf.saxon.value
public class QNameValue extends QualifiedNameValue
Constructor Summary | |
---|---|
QNameValue(String prefix, String uri, String localName)
Constructor for a QName that is known to be valid. | |
QNameValue(String prefix, String uri, String localName, AtomicType type)
Constructor for a QName that is known to be valid, allowing a user-defined subtype of QName
to be specified. | |
QNameValue(NamePool namePool, int nameCode)
Constructor starting from a NamePool namecode | |
QNameValue(String prefix, String uri, String localName, AtomicType type, NameChecker checker)
Constructor. | |
QNameValue(StructuredQName qName, AtomicType typeLabel)
Constructor |
Method Summary | |
---|---|
ConversionResult | convertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context)
Convert a QName to target data type |
AtomicValue | copyAsSubType(AtomicType typeLabel)
Create a copy of this atomic value, with a different type label
|
boolean | equals(Object other)
Determine if two QName values are equal. |
AtomicValue | getComponent(int part)
Get a component. |
BuiltInAtomicType | getPrimitiveType()
Determine the primitive type of the value. |
Comparable | getSchemaComparable() |
Parameters: prefix The prefix part of the QName (not used in comparisons). Use "" to represent the default prefix. uri The namespace part of the QName. Use "" to represent the non-namespace. localName The local part of the QName
Parameters: prefix The prefix part of the QName (not used in comparisons). Use "" to represent the default prefix (but null is also accepted) uri The namespace part of the QName. Use null to represent the non-namespace (but "" is also accepted). localName The local part of the QName type The type label, xs:QName or a subtype of xs:QName
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 "" to represent the default prefix (but null is also accepted). Note that the prefix is not checked for lexical correctness, because in most cases it will already have been matched against in-scope namespaces. Where necessary the caller must check the prefix. uri The namespace part of the QName. Use null to represent the non-namespace (but "" is also accepted). localName The local part of the QName type The atomic type, which must be either xs:QName, or a user-defined type derived from xs:QName by restriction 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)
Throws: XPathException if the local part of the name is malformed or if the name has a null namespace with a non-empty prefix
Parameters: qName the name as a StructuredQName typeLabel idenfies a subtype of xs:QName
Parameters: requiredType an integer identifying the required atomic type context XPath dynamic context
Returns: an AtomicValue, a value of the required type; or an ErrorValue
Parameters: typeLabel the type label of the new copy. The caller is responsible for checking that the value actually conforms to this type.
Throws: ClassCastException if they are not comparable
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