org.enhydra.xml.xhtml.dom.xerces
Class XHTMLDocumentBase
java.lang.Object
|
+--org.enhydra.apache.xerces.dom.NodeImpl
|
+--org.enhydra.apache.xerces.dom.ChildNode
|
+--org.enhydra.apache.xerces.dom.ParentNode
|
+--org.enhydra.apache.xerces.dom.CoreDocumentImpl
|
+--org.enhydra.apache.xerces.dom.DocumentImpl
|
+--org.enhydra.xml.xhtml.dom.xerces.XHTMLDocumentBase
- All Implemented Interfaces:
- Cloneable, Document, DocumentEvent, DocumentRange, DocumentTraversal, EventTarget, HTMLDocument, Node, NodeList, Serializable, XHTMLDocument
- Direct Known Subclasses:
- XHTMLDocumentImpl
- public class XHTMLDocumentBase
- extends org.enhydra.apache.xerces.dom.DocumentImpl
- implements XHTMLDocument
Base class used to implements documents defined in terms of XHTML. This
includes the full XHTML and XHTML modular documents. This defined all of
the HTMLDocument methods plus a framework for creating elements, but no
element definitions themselves.
- See Also:
HTMLDocument
, Serialized Form
Inner classes inherited from class org.enhydra.apache.xerces.dom.DocumentImpl |
org.enhydra.apache.xerces.dom.DocumentImpl.EnclosingAttr, org.enhydra.apache.xerces.dom.DocumentImpl.LEntry |
Fields inherited from class org.enhydra.apache.xerces.dom.DocumentImpl |
eventListeners, iterators, mutationEvents, ranges, savedEnclosingAttr, serialVersionUID, userData |
Fields inherited from class org.enhydra.apache.xerces.dom.CoreDocumentImpl |
allowGrammarAccess, changes, docElement, docType, encoding, errorChecking, identifiers, kidOK, standalone, version |
Fields inherited from class org.enhydra.apache.xerces.dom.ParentNode |
fCachedChild, fCachedChildIndex, fCachedLength, firstChild, ownerDocument |
Fields inherited from class org.enhydra.apache.xerces.dom.ChildNode |
nextSibling, previousSibling |
Fields inherited from class org.enhydra.apache.xerces.dom.NodeImpl |
ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, IGNORABLEWS, OWNED, ownerNode, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATA, UNNORMALIZED |
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Methods inherited from class org.enhydra.apache.xerces.dom.DocumentImpl |
addEventListener, createEvent, createNodeIterator, createNodeIterator, createRange, createTreeWalker, createTreeWalker, deletedText, dispatchAggregateEvents, dispatchAggregateEvents, dispatchEvent, dispatchEventToSubtree, getEventListeners, getMutationEvents, getUserData, insertedNode, insertedText, insertingNode, modifiedAttrValue, modifiedCharacterData, modifyingCharacterData, removedAttrNode, removedNode, removeEventListener, removeNodeIterator, removeRange, removingNode, replacedNode, replacedText, replacingNode, saveEnclosingAttr, setAttrNode, setEventListeners, setMutationEvents, setUserData, splitData |
Methods inherited from class org.enhydra.apache.xerces.dom.CoreDocumentImpl |
, adoptNode, changed, changes, clone, cloneNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createDocumentType, createElementDefinition, createEntity, createEntityReference, createNotation, createProcessingInstruction, createTextNode, getDoctype, getDocumentURI, getDomConfig, getEncoding, getErrorChecking, getIdentifier, getIdentifiers, getInputEncoding, getNodeName, getNodeType, getOwnerDocument, getStandalone, getStrictErrorChecking, getVersion, getXmlEncoding, getXmlStandalone, getXmlVersion, importNode, insertBefore, isKidOK, isXMLName, normalizeDocument, putIdentifier, removeChild, removeIdentifier, renameNode, replaceChild, setDocumentURI, setEncoding, setErrorChecking, setStandalone, setStrictErrorChecking, setVersion, setXmlStandalone, setXmlVersion |
Methods inherited from class org.enhydra.apache.xerces.dom.ParentNode |
checkNormalizationAfterInsert, checkNormalizationAfterRemove, getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, hasChildNodes, internalInsertBefore, internalRemoveChild, item, lastChild, lastChild, normalize, ownerDocument, setOwnerDocument, setReadOnly, synchronizeChildren |
Methods inherited from class org.enhydra.apache.xerces.dom.ChildNode |
getNextSibling, getParentNode, getPreviousSibling, parentNode, previousSibling |
Methods inherited from class org.enhydra.apache.xerces.dom.NodeImpl |
addEventListener, appendChild, compareDocumentPosition, dispatchEvent, getAttributes, getBaseURI, getFeature, getLocalName, getNamespaceURI, getNodeValue, getPrefix, getReadOnly, getTextContent, getUserData, getUserData, hasAttributes, hasStringValue, hasStringValue, internalIsIgnorableWhitespace, isDefaultNamespace, isEqualNode, isFirstChild, isFirstChild, isIgnorableWhitespace, isNormalized, isNormalized, isOwned, isOwned, isReadOnly, isReadOnly, isSameNode, isSpecified, isSpecified, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, needsSyncChildren, needsSyncData, needsSyncData, removeEventListener, setNodeValue, setPrefix, setTextContent, setUserData, setUserData, synchronizeData, toString |
Methods inherited from interface org.w3c.dom.Document |
adoptNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createEntityReference, createProcessingInstruction, createTextNode, getDoctype, getDocumentURI, getDomConfig, getInputEncoding, getStrictErrorChecking, getXmlEncoding, getXmlStandalone, getXmlVersion, importNode, normalizeDocument, renameNode, setDocumentURI, setStrictErrorChecking, setXmlStandalone, setXmlVersion |
Methods inherited from interface org.w3c.dom.Node |
appendChild, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
XHTMLDocumentBase
public XHTMLDocumentBase()
- Constructor without document type.
XHTMLDocumentBase
public XHTMLDocumentBase(DocumentType doctype)
- Constructor with document type.
getDocumentElement
public Element getDocumentElement()
- Specified by:
getDocumentElement
in interface Document
- Overrides:
getDocumentElement
in class org.enhydra.apache.xerces.dom.CoreDocumentImpl
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#getDocumentElement
getHead
public XHTMLElement getHead()
- Obtains the <HEAD> element in the document, creating one if does
not exist before. The <HEAD> element is the first element in the
<HTML> in the document. The <HTML> element is obtained by
calling
getDocumentElement()
. If the element does not exist, one
is created.
Called by getTitle()
, setTitle(java.lang.String)
, getBody()
and
setBody(org.enhydra.xml.xhtml.dom.XHTMLElement)
to assure the document has the <HEAD> element
correctly placed.
- Returns:
- The <HEAD> element
getTitle
public String getTitle()
- Specified by:
getTitle
in interface HTMLDocument
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#getTitle
setTitle
public void setTitle(String newTitle)
- Specified by:
setTitle
in interface HTMLDocument
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#setTitle
getBody
public HTMLElement getBody()
- Specified by:
getBody
in interface HTMLDocument
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#getBody
setBody
public void setBody(XHTMLElement newBody)
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#setBody
setBody
public void setBody(HTMLElement newBody)
- Specified by:
setBody
in interface HTMLDocument
getElementById
public Element getElementById(String elementId)
- Specified by:
getElementById
in interface HTMLDocument
- Overrides:
getElementById
in class org.enhydra.apache.xerces.dom.CoreDocumentImpl
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#getElementById
getElementsByName
public NodeList getElementsByName(String elementName)
- Specified by:
getElementsByName
in interface HTMLDocument
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#getElementsByName
getElementsByTagName
public final NodeList getElementsByTagName(String tagName)
- Specified by:
getElementsByTagName
in interface Document
- Overrides:
getElementsByTagName
in class org.enhydra.apache.xerces.dom.CoreDocumentImpl
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#getElementsByTagName
getElementsByTagNameNS
public final NodeList getElementsByTagNameNS(String namespaceURI,
String localName)
- Specified by:
getElementsByTagNameNS
in interface Document
- Overrides:
getElementsByTagNameNS
in class org.enhydra.apache.xerces.dom.CoreDocumentImpl
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#getElementsByTagNameNS
createElementNS
public Element createElementNS(String namespaceURI,
String qualifiedName,
String localpart)
throws DOMException
- Xerces-specific constructor. "localName" is passed in, so we don't need
to create a new String for it.
- Parameters:
namespaceURI
- The namespace URI of the element to
create.qualifiedName
- The qualified name of the element type to
instantiate.localName
- The local name of the element to instantiate.- Returns:
- Element A new Element object with the following attributes:
- Throws:
DOMException
- INVALID_CHARACTER_ERR: Raised if the specified
name contains an invalid character.
createElementNS
public Element createElementNS(String namespaceURI,
String qualifiedName)
- Specified by:
createElementNS
in interface Document
- Overrides:
createElementNS
in class org.enhydra.apache.xerces.dom.CoreDocumentImpl
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#createElementNS
createElement
public Element createElement(String tagName)
throws DOMException
- Specified by:
createElement
in interface Document
- Overrides:
createElement
in class org.enhydra.apache.xerces.dom.CoreDocumentImpl
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#createElement
getReferrer
public String getReferrer()
- Specified by:
getReferrer
in interface HTMLDocument
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#getReferrer
getDomain
public String getDomain()
- Specified by:
getDomain
in interface HTMLDocument
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#getDomain
getURL
public String getURL()
- Specified by:
getURL
in interface HTMLDocument
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#getURL
getCookie
public String getCookie()
- Specified by:
getCookie
in interface HTMLDocument
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#getCookie
setCookie
public void setCookie(String cookie)
- Specified by:
setCookie
in interface HTMLDocument
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#setCookie
getImages
public HTMLCollection getImages()
- Specified by:
getImages
in interface HTMLDocument
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#getImages
getApplets
public HTMLCollection getApplets()
- Specified by:
getApplets
in interface HTMLDocument
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#getApplets
getLinks
public HTMLCollection getLinks()
- Specified by:
getLinks
in interface HTMLDocument
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#getLinks
getForms
public HTMLCollection getForms()
- Specified by:
getForms
in interface HTMLDocument
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#getForms
getAnchors
public HTMLCollection getAnchors()
- Specified by:
getAnchors
in interface HTMLDocument
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#getAnchors
open
public void open()
- Specified by:
open
in interface HTMLDocument
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#optn
close
public void close()
- Specified by:
close
in interface HTMLDocument
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#close
write
public void write(String text)
- Specified by:
write
in interface HTMLDocument
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#write
writeln
public void writeln(String text)
- Specified by:
writeln
in interface HTMLDocument
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#writeln
cloneNode
public Node cloneNode(boolean deep)
- Specified by:
cloneNode
in interface Node
- Overrides:
cloneNode
in class org.enhydra.apache.xerces.dom.DocumentImpl
- See Also:
org.enhydra.apache.html.dom.HTMLDocumentImpl#cloneNode
getImplementation
public DOMImplementation getImplementation()
- override in order to return the correct dom implementation for XHTML
- Specified by:
getImplementation
in interface Document
- Overrides:
getImplementation
in class org.enhydra.apache.xerces.dom.DocumentImpl
- See Also:
DocumentImpl.getImplementation()
Copyright © 1999-2002 Mark Diekhans, enhydra.org. All Rights reserved.