Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xalan.utils
Class QName

    java.lang.Object
      |
      +--org.apache.serialize.QName
            |
            +--org.apache.xalan.utils.QName

public class QName
extends QName
implements java.io.Serializable

Class to represent a qualified name: "The name of an internal XSLT object, specifically a named template (see [7 Named Templates]), a mode (see [6.7 Modes]), an attribute set (see [8.1.4 Named Attribute Sets]), a key (see [14.2 Keys]), a locale (see [14.3 Number Formatting]), a variable or a parameter (see [12 Variables and Parameters]) is specified as a QName. If it has a prefix, then the prefix is expanded into a URI reference using the namespace declarations in effect on the attribute in which the name occurs. The expanded name consisting of the local part of the name and the possibly null URI reference is used as the name of the object. The default namespace is not used for unprefixed names."

See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `S_XMLNAMESPACEURI` The XML namespace.

Constructor Summary
`QName(java.lang.String localName)` Construct a QName from a string, without namespace resolution.
`QName(java.lang.String qname, Element namespaceContext, PrefixResolver resolver)` Construct a QName from a string, resolving the prefix using the given namespace stack.
`QName(java.lang.String qname, PrefixResolver resolver)` Construct a QName from a string, resolving the prefix using the given namespace stack.
`QName(java.lang.String qname, java.util.Stack namespaces)` Construct a QName from a string, resolving the prefix using the given namespace stack.
`QName(java.lang.String ns, java.lang.String localName)` Construct a QName from a namespace and a local name.

Method Summary
`boolean` | `equals(QName qname)` Override equals and agree that we're equal if the passed object is a QName and it matches the name of the arg.
`boolean` | `equals(java.lang.String ns, java.lang.String localPart)` Override equals and agree that we're equal if the passed object is a string and it matches the name of the arg.
`java.lang.String` | `getLocalPart()` Get the local part of the qualified name.
`static java.lang.String` | `getLocalPart(java.lang.String qname)` Returns the local name of the given node.
`java.lang.String` | `getNamespace()` Get the namespace of the qualified name.
`static java.lang.String` | `getPrefixFromXMLNSDecl(java.lang.String attRawName)` This function tells if a raw attribute name is a xmlns attribute.
`static java.lang.String` | `getPrefixPart(java.lang.String qname)` Returns the local name of the given node.
`int` | `hashCode()` Return the cached hashcode of the qualified name.
`static boolean` | `isXMLNSDecl(java.lang.String attRawName)` This function tells if a raw attribute name is a xmlns attribute.
`java.lang.String` | `toString()` Return the string representation of the namespace.

Methods inherited from class org.apache.serialize.QName
`equals, getLocalName, getNamespaceURI, getPrefix`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### S_XMLNAMESPACEURI

    public static final java.lang.String S_XMLNAMESPACEURI

  The XML namespace.

Constructor Detail

### QName

    public QName(java.lang.String localName)

  Construct a QName from a string, without namespace resolution. Good for a few odd cases.

### QName

    public QName(java.lang.String ns,
                 java.lang.String localName)

  Construct a QName from a namespace and a local name.

### QName

    public QName(java.lang.String qname,
                 java.util.Stack namespaces)

  Construct a QName from a string, resolving the prefix using the given namespace stack. The default namespace is not resolved.

### QName

    public QName(java.lang.String qname,
                 Element namespaceContext,
                 PrefixResolver resolver)

  Construct a QName from a string, resolving the prefix using the given namespace stack. The default namespace is not resolved.

### QName

    public QName(java.lang.String qname,
                 PrefixResolver resolver)

  Construct a QName from a string, resolving the prefix using the given namespace stack. The default namespace is not resolved.

Method Detail

### getNamespace

    public java.lang.String getNamespace()

  Get the namespace of the qualified name.

### getLocalPart

    public java.lang.String getLocalPart()

  Get the local part of the qualified name.

### hashCode

    public int hashCode()

  Return the cached hashcode of the qualified name.
  Overrides:
    hashCode in class java.lang.Object

### equals

    public boolean equals(java.lang.String ns,
                          java.lang.String localPart)

  Override equals and agree that we're equal if the passed object is a string and it matches the name of the arg.
  Overrides:
    equals in class QName

### equals

    public boolean equals(QName qname)

  Override equals and agree that we're equal if the passed object is a QName and it matches the name of the arg.

### isXMLNSDecl

    public static boolean isXMLNSDecl(java.lang.String attRawName)

  This function tells if a raw attribute name is a xmlns attribute.

### getPrefixFromXMLNSDecl

    public static java.lang.String getPrefixFromXMLNSDecl(java.lang.String attRawName)

  This function tells if a raw attribute name is a xmlns attribute.

### getLocalPart

    public static java.lang.String getLocalPart(java.lang.String qname)

  Returns the local name of the given node.

### getPrefixPart

    public static java.lang.String getPrefixPart(java.lang.String qname)

  Returns the local name of the given node.

### toString

    public java.lang.String toString()

  Return the string representation of the namespace. Performs string concatenation, so beware of performance issues.
  Overrides:
    toString in class QName

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 Apache XML Project. All Rights Reserved.