Top Description Fields Constructors Methods
org.apache.xerces.dom

public Class AttrNSImpl

extends AttrImpl
Class Inheritance
Known Direct Subclasses
org.apache.xerces.dom.DeferredAttrNSImpl, org.apache.xerces.dom.PSVIAttrNSImpl
Imports
org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl, org.apache.xerces.xni.NamespaceContext, org.w3c.dom.DOMException

AttrNSImpl inherits from AttrImpl and adds namespace support.

The qualified name is the node name, and we store localName which is also used in all queries. On the other hand we recompute the prefix when necessary.

Authors
Arnaud Le Hors, IBM, Andy Clark, IBM, Ralf Pfeiffer, IBM
Version
$Id: AttrNSImpl.java 924245 2010-03-17 11:58:14Z mrglavas $

Field Summary

Modifier and TypeField and Description
protected String
localName

DOM2: localName.

protected String
namespaceURI

DOM2: Namespace URI.

pack-priv static final long
pack-priv static final String
pack-priv static final String
Inherited from org.apache.xerces.dom.AttrImpl:
DTD_URInametypevalue

Constructor Summary

AccessConstructor and Description
public
protected
AttrNSImpl(CoreDocumentImpl ownerDocument, String namespaceURI, String qualifiedName)

DOM2: Constructor for Namespace implementation.

public
AttrNSImpl(CoreDocumentImpl ownerDocument, String namespaceURI, String qualifiedName, String localName)

protected
AttrNSImpl(CoreDocumentImpl ownerDocument, String value)

Method Summary

Modifier and TypeMethod and Description
public String
public String
public String
getPrefix()

Overrides org.apache.xerces.dom.NodeImpl.getPrefix.

Implements org.w3c.dom.Node.getPrefix.

Introduced in DOM Level 2.
public String
getTypeName()

Overrides org.apache.xerces.dom.AttrImpl.getTypeName.

Implements org.w3c.dom.TypeInfo.getTypeName.

The name of a type declared for the associated element or attribute, or null if unknown.
public String
getTypeNamespace()

Overrides org.apache.xerces.dom.AttrImpl.getTypeNamespace.

Implements org.w3c.dom.TypeInfo.getTypeNamespace.

The namespace of the type declared for the associated element or attribute or null if the element does not have declaration or if no namespace information is available.
public boolean

Returns:

boolean True if the type is derived by restriciton for the reference type
isDerivedFrom
(String
The namspace of the ancestor type declaration
typeNamespaceArg
,
String
The name of the ancestor type declaration
typeNameArg
,
int
The derivation method
derivationMethod
)

Overrides org.apache.xerces.dom.AttrImpl.isDerivedFrom.

Implements org.w3c.dom.TypeInfo.isDerivedFrom.

Introduced in DOM Level 3.
pack-priv void
rename(String namespaceURI, String qualifiedName)

private void
setName(String namespaceURI, String qname)

public void
setPrefix(String
The namespace prefix of this node, or null(empty string) if it is unspecified.
prefix
)

Overrides org.apache.xerces.dom.NodeImpl.setPrefix.

Implements org.w3c.dom.Node.setPrefix.

Introduced in DOM Level 2.
Inherited from org.apache.xerces.dom.AttrImpl:
checkNormalizationAfterInsertcheckNormalizationAfterRemovecloneNodegetChildNodesgetElementgetFirstChildgetLastChildgetLengthgetNamegetNodeNamegetNodeTypegetNodeValuegetOwnerElementgetSchemaTypeInfogetSpecifiedgetValuehasChildNodesinsertBeforeinternalInsertBeforeinternalRemoveChildisEqualNodeisIditemlastChildlastChildmakeChildNodenormalizeremoveChildrenamereplaceChildsetIdAttributesetNodeValuesetOwnerDocumentsetReadOnlysetSpecifiedsetTypesetValuesynchronizeChildrentoString

Field Detail

localNameback to summary
protected String localName

DOM2: localName.

namespaceURIback to summary
protected String namespaceURI

DOM2: Namespace URI.

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides org.apache.xerces.dom.AttrImpl.serialVersionUID.

Serialization version.

xmlnsURIback to summary
pack-priv static final String xmlnsURI
xmlURIback to summary
pack-priv static final String xmlURI

Constructor Detail

AttrNSImplback to summary
public AttrNSImpl()
AttrNSImplback to summary
protected AttrNSImpl(CoreDocumentImpl ownerDocument, String namespaceURI, String qualifiedName)

DOM2: Constructor for Namespace implementation.

AttrNSImplback to summary
public AttrNSImpl(CoreDocumentImpl ownerDocument, String namespaceURI, String qualifiedName, String localName)
AttrNSImplback to summary
protected AttrNSImpl(CoreDocumentImpl ownerDocument, String value)

Method Detail

getLocalNameback to summary
public String getLocalName()

Overrides org.apache.xerces.dom.NodeImpl.getLocalName.

Implements org.w3c.dom.Node.getLocalName.

Introduced in DOM Level 2.

Returns the local part of the qualified name of this node.

Since
WD-DOM-Level-2-19990923
getNamespaceURIback to summary
public String getNamespaceURI()

Overrides org.apache.xerces.dom.NodeImpl.getNamespaceURI.

Implements org.w3c.dom.Node.getNamespaceURI.

Introduced in DOM Level 2.

The namespace URI of this node, or null if it is unspecified.

This is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope. It is merely the namespace URI given at creation time.

For nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is null.

Since
WD-DOM-Level-2-19990923
getPrefixback to summary
public String getPrefix()

Overrides org.apache.xerces.dom.NodeImpl.getPrefix.

Implements org.w3c.dom.Node.getPrefix.

Introduced in DOM Level 2.

The namespace prefix of this node, or null if it is unspecified.

For nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is null.

Since
WD-DOM-Level-2-19990923
getTypeNameback to summary
public String getTypeName()

Overrides org.apache.xerces.dom.AttrImpl.getTypeName.

Implements org.w3c.dom.TypeInfo.getTypeName.

Doc from org.w3c.dom.TypeInfo.getTypeName.

The name of a type declared for the associated element or attribute, or null if unknown.

See Also
org.w3c.dom.TypeInfo#getTypeName()
getTypeNamespaceback to summary
public String getTypeNamespace()

Overrides org.apache.xerces.dom.AttrImpl.getTypeNamespace.

Implements org.w3c.dom.TypeInfo.getTypeNamespace.

Doc from org.w3c.dom.TypeInfo.getTypeNamespace.

The namespace of the type declared for the associated element or attribute or null if the element does not have declaration or if no namespace information is available.

See Also
org.w3c.dom.TypeInfo#getTypeNamespace()
isDerivedFromback to summary
public boolean isDerivedFrom(String typeNamespaceArg, String typeNameArg, int derivationMethod)

Overrides org.apache.xerces.dom.AttrImpl.isDerivedFrom.

Implements org.w3c.dom.TypeInfo.isDerivedFrom.

Introduced in DOM Level 3.

Checks if a type is derived from another by restriction. See: http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-isDerivedFrom

Parameters
typeNamespaceArg:String

The namspace of the ancestor type declaration

typeNameArg:String

The name of the ancestor type declaration

derivationMethod:int

The derivation method

Returns:boolean

boolean True if the type is derived by restriciton for the reference type

renameback to summary
pack-priv void rename(String namespaceURI, String qualifiedName)
setNameback to summary
private void setName(String namespaceURI, String qname)
setPrefixback to summary
public void setPrefix(String prefix) throws DOMException

Overrides org.apache.xerces.dom.NodeImpl.setPrefix.

Implements org.w3c.dom.Node.setPrefix.

Introduced in DOM Level 2.

Note that setting this attribute changes the nodeName attribute, which holds the qualified name, as well as the tagName and name attributes of the Element and Attr interfaces, when applicable.

Parameters
prefix:String

The namespace prefix of this node, or null(empty string) if it is unspecified.

Exceptions
DOMException:

Doc from org.w3c.dom.Node.setPrefix.

INVALID_CHARACTER_ERR: Raised if the specified prefix contains an illegal character according to the XML version in use specified in the Document.xmlVersion attribute.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NAMESPACE_ERR: Raised if the specified prefix is malformed per the Namespaces in XML specification, if the namespaceURI of this node is null, if the specified prefix is "xml" and the namespaceURI of this node is different from " http://www.w3.org/XML/1998/namespace", if this node is an attribute and the specified prefix is "xmlns" and the namespaceURI of this node is different from "http://www.w3.org/2000/xmlns/", or if this node is an attribute and the qualifiedName of this node is "xmlns" [XML Namespaces] .

INVALID_CHARACTER_ERR:
Raised if the specified prefix contains an invalid character.
Since
WD-DOM-Level-2-19990923