| java.lang.Object net.sf.saxon.value.Value net.sf.saxon.value.AtomicValue net.sf.saxon.value.QNameValue
All known Subclasses: net.sf.saxon.value.NotationValue,
QNameValue | public class QNameValue extends AtomicValue (Code) | | A QName value. This implements the so-called "triples proposal", in which the prefix is retained as
part of the value. The prefix is not used in any operation on a QName other than conversion of the
QName to a string.
|
QNameValue | public QNameValue(NamePool namePool, int nameCode)(Code) | | Constructor
Parameters: namePool - The name pool containing the specified name code Parameters: nameCode - The name code identifying this name in the name pool |
QNameValue | public QNameValue(String prefix, String uri, String localName, NameChecker checker) throws XPathException(Code) | | Constructor. This constructor validates that the local part is a valid NCName.
Parameters: prefix - The prefix part of the QName (not used in comparisons). Use null or "" to represent thedefault prefix. Parameters: uri - The namespace part of the QName. Use null or "" to represent the null namespace. Parameters: localName - The local part of the QName Parameters: checker - NameChecker used to check the name against XML 1.0 or XML 1.1 rules. Supply nullif the name does not need to be checked (the caller asserts that it is known to be valid) |
allocateNameCode | public int allocateNameCode(NamePool pool)(Code) | | Allocate a nameCode for this QName in the NamePool
Parameters: pool - the NamePool to be used the allocated nameCode |
castToQName | public static AtomicValue castToQName(StringValue operand, AtomicType targetType, StaticContext env) throws XPathException(Code) | | Create a QName value (possibly a DerivedAtomicValue derived from QName) from
a string literal, given a namespace context
Parameters: operand - the input string Parameters: targetType - the type required: QName, or a type derived from QName or NOTATION Parameters: env - the static context, including the namespace context the value after conversion throws: XPathException - if the name is lexically invalid or uses an undeclared prefix |
convertPrimitive | public AtomicValue convertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context)(Code) | | Convert to target data type
Parameters: requiredType - an integer identifying the required atomic type Parameters: context - an AtomicValue, a value of the required type; or an ErrorValue |
equals | public boolean equals(Object other)(Code) | | Determine if two QName values are equal. This comparison ignores the prefix part
of the value.
throws: ClassCastException - if they are not comparable throws: IllegalStateException - if the two QNames are in different name pools |
getClarkName | public String getClarkName()(Code) | | Get the name in Clark notation, that is {uri}local
|
getComponent | public AtomicValue getComponent(int part)(Code) | | Get a component. Returns a zero-length string if the namespace-uri component is
requested and is not present.
Parameters: part - either Component.LOCALNAME or Component.NAMESPACE indicating whichcomponent of the value is required either the local name or the namespace URI, in each case as a StringValue |
getLocalName | public String getLocalName()(Code) | | Get the local part
|
getNamespaceURI | public String getNamespaceURI()(Code) | | Get the namespace part (null means no namespace)
|
getStringValue | public String getStringValue()(Code) | | Get the string value as a String. Returns the QName as a lexical QName, retaining the original
prefix if available.
|
hashCode | public int hashCode()(Code) | | |
makeQName | public Object makeQName(Configuration config)(Code) | | Temporary method to construct a javax.xml.namespace.QName without actually mentioning it
by name
|
toString | public String toString()(Code) | | The toString() method returns the name in the form QName("uri", "local")
the name in in the form QName("uri", "local") |
Fields inherited from net.sf.saxon.value.Value | final public static Class[] EMPTY_CLASS_ARRAY(Code)(Java Doc)
|
Methods inherited from net.sf.saxon.value.Value | public static Item asItem(ValueRepresentation value, XPathContext context) throws XPathException(Code)(Java Doc) public static SequenceIterator asIterator(ValueRepresentation val, XPathContext context) throws XPathException(Code)(Java Doc) public static Value asValue(ValueRepresentation val)(Code)(Java Doc) public void checkPermittedContents(SchemaType parentType, StaticContext env, boolean whole) throws XPathException(Code)(Java Doc) public static CharSequence collapseWhitespace(CharSequence in)(Code)(Java Doc) public static Object convert(Item item) throws XPathException(Code)(Java Doc) public static Value convertJavaObjectToXPath(Object object, SequenceType requiredType, Configuration config) throws XPathException(Code)(Java Doc) public Object convertToJava(Class target, XPathContext context) throws XPathException(Code)(Java Doc) public void display(int level, NamePool pool, PrintStream out)(Code)(Java Doc) public boolean effectiveBooleanValue(XPathContext context) throws XPathException(Code)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) public String evaluateAsString(XPathContext context) throws XPathException(Code)(Java Doc) public Item evaluateItem(XPathContext context) throws XPathException(Code)(Java Doc) public int getCardinality()(Code)(Java Doc) final public int getDependencies()(Code)(Java Doc) public ItemType getItemType(TypeHierarchy th)(Code)(Java Doc) public static SequenceIterator getIterator(ValueRepresentation val) throws XPathException(Code)(Java Doc) public int getLength() throws XPathException(Code)(Java Doc) final public Container getParentExpression()(Code)(Java Doc) public int getSpecialProperties()(Code)(Java Doc) public String getStringValue() throws XPathException(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public Item itemAt(int n) throws XPathException(Code)(Java Doc) final public Iterator iterateSubExpressions()(Code)(Java Doc) public static QNameValue makeQNameValue(Object object, Configuration config)(Code)(Java Doc) public static CharSequence normalizeWhitespace(CharSequence in)(Code)(Java Doc) final public Expression optimize(Optimizer opt, StaticContext env, ItemType contextItemType)(Code)(Java Doc) public void process(XPathContext context) throws XPathException(Code)(Java Doc) final public Expression promote(PromotionOffer offer)(Code)(Java Doc) public Value reduce() throws XPathException(Code)(Java Doc) public boolean schemaEquals(Value obj)(Code)(Java Doc) final public Expression simplify(StaticContext env)(Code)(Java Doc) public static double stringToNumber(CharSequence s) throws NumberFormatException(Code)(Java Doc) public String toString()(Code)(Java Doc) public static CharSequence trimWhitespace(CharSequence in)(Code)(Java Doc) final public Expression typeCheck(StaticContext env, ItemType contextItemType)(Code)(Java Doc)
|
|
|