| java.lang.Object org.zkoss.idom.impl.AbstractItem org.zkoss.idom.Attribute
Attribute | public class Attribute extends AbstractItem implements Namespaceable,Attr(Code) | | The iDOM attribute.
Design decision: Attribute is also a item. The reason is
it simplifies the use of xpath. A xpath migt return either
elements or attributes, so...
author: tomyeh See Also: Element |
Attribute | public Attribute(String nsURI, String tname, String value)(Code) | | Constructor.
Note: According to W3/DOM, the namespace of attributes must
have a prefix if the uri is not empty.
Parameters: nsURI - the namespace URI Parameters: tname - the tag name |
Attribute | public Attribute(Namespace ns, String lname, String value)(Code) | | Constructor.
Parameters: ns - the namespace Parameters: lname - the local name |
Attribute | protected Attribute()(Code) | | Constructor.
|
clone | public Item clone(boolean preserveModified)(Code) | | |
detach | public Item detach()(Code) | | Detach the attribute from its owner, if any.
Only attributes that belongs to no item or the same item
are allowed to be added to a item. So, detach is useful
to move an attribute out from a item (and then you might
add it to another item).
|
getDocument | final public Document getDocument()(Code) | | Gets the document that owns this attribute.
|
getNodeType | final public short getNodeType()(Code) | | |
getOwner | final public Item getOwner()(Code) | | Gets the item that owns this attribute.
|
getSpecified | final public boolean getSpecified()(Code) | | |
getValue | final public String getValue()(Code) | | Gets the value of this attribute.
|
isId | public boolean isId()(Code) | | |
isReadonly | final public boolean isReadonly()(Code) | | Tests whether this attribute is read-only.
Note: An attribute is read-only if the read-only flag is set (setReadonly)
or any of its owner item is read-only (getOwner().isReadonly()).
|
setLocalName | final public void setLocalName(String lname)(Code) | | Sets the local name of this attribute.
Changing a name improperly might cause replicated attribute
names which won't be detected by this method.
|
setModified | public void setModified()(Code) | | |
setNamespace | final public void setNamespace(String prefix, String nsURI)(Code) | | Sets the namespace.
|
setNamespace | final public void setNamespace(Namespace ns)(Code) | | Sets the namespace.
According W3C/DOM, unlike element, an attribute doesn't allow
a namespace that has an URI but without a prefix.
|
setOwner | final public void setOwner(Item owner)(Code) | | Sets the item that owns this attribute.
DO NOT call this method. It is used internally.
For user's point of view, the owner item is maintained
automatically, so user never needs to update it.
|
setPrefix | final public void setPrefix(String prefix)(Code) | | Sets the namespace prefix of this attribute.
Changing a prefix improperly might cause replicated attribute
names which won't be detected by this method.
|
setTagName | final public void setTagName(String tname)(Code) | | Sets the tag name.
Changing a name improperly might cause replicated attribute
names which won't be detected by this method.
|
setValue | final public void setValue(String value)(Code) | | Sets the value of this attribute.
According to Section 3.3.3 of XML 1.0 spec, the value is always
normalized. Whether to trim depends on whether an attribute is CDATA
(default).
In this version, we don't normalize or trim
(i.e., consider it as CDATA).
Parameters: value - the new value; null is considered as empty |
Fields inherited from org.zkoss.idom.impl.AbstractItem | protected transient boolean _modified(Code)(Java Doc)
|
Methods inherited from org.zkoss.idom.impl.AbstractItem | public Node appendChild(Node newChild)(Code)(Java Doc) final protected void checkWritable()(Code)(Java Doc) public void clearModified(boolean includingDescendant)(Code)(Java Doc) public Item clone(boolean preserveModified)(Code)(Java Doc) public Object clone()(Code)(Java Doc) final public Node cloneNode(boolean deep)(Code)(Java Doc) public short compareDocumentPosition(Node other) throws DOMException(Code)(Java Doc) public Item detach()(Code)(Java Doc) final public boolean equals(Object o)(Code)(Java Doc) public NamedNodeMap getAttributes()(Code)(Java Doc) public String getBaseURI()(Code)(Java Doc) public NodeList getChildNodes()(Code)(Java Doc) public Document getDocument()(Code)(Java Doc) public Object getFeature(String feature, String version)(Code)(Java Doc) public Node getFirstChild()(Code)(Java Doc) public Node getLastChild()(Code)(Java Doc) public String getLocalName()(Code)(Java Doc) final public Locator getLocator()(Code)(Java Doc) public String getNamespaceURI()(Code)(Java Doc) final public Node getNextSibling()(Code)(Java Doc) public String getNodeName()(Code)(Java Doc) public String getNodeValue()(Code)(Java Doc) public org.w3c.dom.Document getOwnerDocument()(Code)(Java Doc) final public Group getParent()(Code)(Java Doc) final public Node getParentNode()(Code)(Java Doc) public String getPrefix()(Code)(Java Doc) final public Node getPreviousSibling()(Code)(Java Doc) public String getText()(Code)(Java Doc) public String getTextContent() throws DOMException(Code)(Java Doc) public Object getUserData(String key)(Code)(Java Doc) public boolean hasAttributes()(Code)(Java Doc) public boolean hasChildNodes()(Code)(Java Doc) final public int hashCode()(Code)(Java Doc) public Node insertBefore(Node newChild, Node refChild)(Code)(Java Doc) public boolean isDefaultNamespace(String namespaceURI)(Code)(Java Doc) public boolean isEqualNode(Node arg)(Code)(Java Doc) public boolean isModified()(Code)(Java Doc) public boolean isReadonly()(Code)(Java Doc) public boolean isSameNode(Node other)(Code)(Java Doc) final public boolean isSupported(String feature, String version)(Code)(Java Doc) public String lookupNamespaceURI(String prefix)(Code)(Java Doc) public String lookupPrefix(String namespaceURI)(Code)(Java Doc) protected static boolean match(Namespaceable vtx, String namespace, String name, Pattern ptn, int mode)(Code)(Java Doc) final public void normalize()(Code)(Java Doc) public Node removeChild(Node oldChild)(Code)(Java Doc) public Node replaceChild(Node newChild, Node oldChild)(Code)(Java Doc) final public void setLocator(Locator loc)(Code)(Java Doc) public void setModified()(Code)(Java Doc) public void setName(String name)(Code)(Java Doc) public void setNodeValue(String nodeValue)(Code)(Java Doc) public void setParent(Group parent)(Code)(Java Doc) public void setPrefix(String prefix)(Code)(Java Doc) public void setReadonly(boolean readonly)(Code)(Java Doc) public void setText(String text)(Code)(Java Doc) public void setTextContent(String textContent) throws DOMException(Code)(Java Doc) public Object setUserData(String key, Object data, UserDataHandler handler)(Code)(Java Doc)
|
|
|