org.enhydra.xml.xhtml.dom.xerces
Class XHTMLDocumentBase

java.lang.Object
  |
  +--org.apache.xerces.dom.NodeImpl
        |
        +--org.apache.xerces.dom.ChildNode
              |
              +--org.apache.xerces.dom.ParentNode
                    |
                    +--org.apache.xerces.dom.CoreDocumentImpl
                          |
                          +--org.apache.xerces.dom.DocumentImpl
                                |
                                +--org.enhydra.xml.xhtml.dom.xerces.XHTMLDocumentBase
All Implemented Interfaces:
java.lang.Cloneable, org.w3c.dom.Document, org.w3c.dom.events.DocumentEvent, org.w3c.dom.ranges.DocumentRange, org.w3c.dom.traversal.DocumentTraversal, org.w3c.dom.events.EventTarget, org.w3c.dom.html.HTMLDocument, org.w3c.dom.Node, org.w3c.dom.NodeList, java.io.Serializable
Direct Known Subclasses:
XHTMLDocumentImpl

public class XHTMLDocumentBase
extends org.apache.xerces.dom.DocumentImpl
implements org.w3c.dom.html.HTMLDocument

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.apache.xerces.dom.DocumentImpl
org.apache.xerces.dom.DocumentImpl.EnclosingAttr, org.apache.xerces.dom.DocumentImpl.LEntry
 
Fields inherited from class org.apache.xerces.dom.DocumentImpl
eventListeners, iterators, mutationEvents, ranges, savedEnclosingAttr, serialVersionUID, userData
 
Fields inherited from class org.apache.xerces.dom.CoreDocumentImpl
allowGrammarAccess, changes, docElement, docType, encoding, errorChecking, identifiers, kidOK, standalone, version
 
Fields inherited from class org.apache.xerces.dom.ParentNode
fCachedChild, fCachedChildIndex, fCachedLength, firstChild, ownerDocument
 
Fields inherited from class org.apache.xerces.dom.ChildNode
nextSibling, previousSibling
 
Fields inherited from class org.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_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
XHTMLDocumentBase(org.w3c.dom.DocumentType doctype, java.util.HashMap elementTypes)
          Constructor with document type.
XHTMLDocumentBase(java.util.HashMap elementTypes)
          Constructor without document type.
 
Method Summary
 org.w3c.dom.Node cloneNode(boolean deep)
           
 void close()
           
 org.w3c.dom.Element createElement(java.lang.String tagName)
           
 org.w3c.dom.Element createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName)
           
 org.w3c.dom.html.HTMLCollection getAnchors()
           
 org.w3c.dom.html.HTMLCollection getApplets()
           
 org.w3c.dom.html.HTMLElement getBody()
           
 java.lang.String getCookie()
           
 org.w3c.dom.Element getDocumentElement()
           
 java.lang.String getDomain()
           
 org.w3c.dom.Element getElementById(java.lang.String elementId)
           
 org.w3c.dom.NodeList getElementsByName(java.lang.String elementName)
           
 org.w3c.dom.NodeList getElementsByTagName(java.lang.String tagName)
           
 org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
           
 org.w3c.dom.html.HTMLCollection getForms()
           
 org.w3c.dom.html.HTMLElement getHead()
          Obtains the <HEAD> element in the document, creating one if does not exist before.
 org.w3c.dom.html.HTMLCollection getImages()
           
 org.w3c.dom.html.HTMLCollection getLinks()
           
 java.lang.String getReferrer()
           
 java.lang.String getTitle()
           
 java.lang.String getURL()
           
 void open()
           
 void setBody(org.w3c.dom.html.HTMLElement newBody)
           
 void setCookie(java.lang.String cookie)
           
 void setTitle(java.lang.String newTitle)
           
 void write(java.lang.String text)
           
 void writeln(java.lang.String text)
           
 
Methods inherited from class org.apache.xerces.dom.DocumentImpl
addEventListener, createEvent, createNodeIterator, createNodeIterator, createRange, createTreeWalker, createTreeWalker, deletedText, dispatchAggregateEvents, dispatchAggregateEvents, dispatchEvent, dispatchEventToSubtree, getEventListeners, getImplementation, 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.apache.xerces.dom.CoreDocumentImpl
, adoptNode, changed, changes, clone, cloneNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createDocumentType, createElementDefinition, createEntity, createEntityReference, createNotation, createProcessingInstruction, createTextNode, getDoctype, getEncoding, getErrorChecking, getIdentifier, getIdentifiers, getNodeName, getNodeType, getOwnerDocument, getStandalone, getStrictErrorChecking, getVersion, importNode, insertBefore, isKidOK, isXMLName, putIdentifier, removeChild, removeIdentifier, replaceChild, setEncoding, setErrorChecking, setStandalone, setStrictErrorChecking, setVersion
 
Methods inherited from class org.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.apache.xerces.dom.ChildNode
getNextSibling, getParentNode, getPreviousSibling, parentNode, previousSibling
 
Methods inherited from class org.apache.xerces.dom.NodeImpl
addEventListener, appendChild, dispatchEvent, getAttributes, getLocalName, getNamespaceURI, getNodeValue, getPrefix, getReadOnly, getUserData, hasAttributes, hasStringValue, hasStringValue, internalIsIgnorableWhitespace, isFirstChild, isFirstChild, isIgnorableWhitespace, isNormalized, isNormalized, isOwned, isOwned, isReadOnly, isReadOnly, isSpecified, isSpecified, isSupported, needsSyncChildren, needsSyncChildren, needsSyncData, needsSyncData, removeEventListener, setNodeValue, setPrefix, setUserData, synchronizeData, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Document
adoptNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createEntityReference, createProcessingInstruction, createTextNode, getDoctype, getEncoding, getImplementation, getStandalone, getStrictErrorChecking, getVersion, importNode, setEncoding, setStandalone, setStrictErrorChecking, setVersion
 
Methods inherited from interface org.w3c.dom.Node
appendChild, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 

Constructor Detail

XHTMLDocumentBase

public XHTMLDocumentBase(java.util.HashMap elementTypes)
Constructor without document type.
Parameters:
elementTypes - Map of element names to element classes.

XHTMLDocumentBase

public XHTMLDocumentBase(org.w3c.dom.DocumentType doctype,
                         java.util.HashMap elementTypes)
Constructor with document type.
Method Detail

getDocumentElement

public org.w3c.dom.Element getDocumentElement()
Specified by:
getDocumentElement in interface org.w3c.dom.Document
Overrides:
getDocumentElement in class org.apache.xerces.dom.CoreDocumentImpl
See Also:
HTMLDocumentImpl#getDocumentElement

getHead

public org.w3c.dom.html.HTMLElement 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.
Returns:
The <HEAD> element

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface org.w3c.dom.html.HTMLDocument
See Also:
HTMLDocumentImpl#getTitle

setTitle

public void setTitle(java.lang.String newTitle)
Specified by:
setTitle in interface org.w3c.dom.html.HTMLDocument
See Also:
HTMLDocumentImpl#setTitle

getBody

public org.w3c.dom.html.HTMLElement getBody()
Specified by:
getBody in interface org.w3c.dom.html.HTMLDocument
See Also:
HTMLDocumentImpl#getBody

setBody

public void setBody(org.w3c.dom.html.HTMLElement newBody)
Specified by:
setBody in interface org.w3c.dom.html.HTMLDocument
See Also:
HTMLDocumentImpl#setBody

getElementById

public org.w3c.dom.Element getElementById(java.lang.String elementId)
Specified by:
getElementById in interface org.w3c.dom.Document
Overrides:
getElementById in class org.apache.xerces.dom.CoreDocumentImpl
See Also:
HTMLDocumentImpl#getElementById

getElementsByName

public org.w3c.dom.NodeList getElementsByName(java.lang.String elementName)
Specified by:
getElementsByName in interface org.w3c.dom.html.HTMLDocument
See Also:
HTMLDocumentImpl#getElementsByName

getElementsByTagName

public final org.w3c.dom.NodeList getElementsByTagName(java.lang.String tagName)
Specified by:
getElementsByTagName in interface org.w3c.dom.Document
Overrides:
getElementsByTagName in class org.apache.xerces.dom.CoreDocumentImpl
See Also:
HTMLDocumentImpl#getElementsByTagName

getElementsByTagNameNS

public final org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI,
                                                         java.lang.String localName)
Specified by:
getElementsByTagNameNS in interface org.w3c.dom.Document
Overrides:
getElementsByTagNameNS in class org.apache.xerces.dom.CoreDocumentImpl
See Also:
HTMLDocumentImpl#getElementsByTagNameNS

createElementNS

public org.w3c.dom.Element createElementNS(java.lang.String namespaceURI,
                                           java.lang.String qualifiedName)
Specified by:
createElementNS in interface org.w3c.dom.Document
Overrides:
createElementNS in class org.apache.xerces.dom.CoreDocumentImpl
See Also:
HTMLDocumentImpl#createElementNS

createElement

public org.w3c.dom.Element createElement(java.lang.String tagName)
                                  throws org.w3c.dom.DOMException
Specified by:
createElement in interface org.w3c.dom.Document
Overrides:
createElement in class org.apache.xerces.dom.CoreDocumentImpl
See Also:
HTMLDocumentImpl#createElement

getReferrer

public java.lang.String getReferrer()
Specified by:
getReferrer in interface org.w3c.dom.html.HTMLDocument
See Also:
HTMLDocumentImpl#getReferrer

getDomain

public java.lang.String getDomain()
Specified by:
getDomain in interface org.w3c.dom.html.HTMLDocument
See Also:
HTMLDocumentImpl#getDomain

getURL

public java.lang.String getURL()
Specified by:
getURL in interface org.w3c.dom.html.HTMLDocument
See Also:
HTMLDocumentImpl#getURL

getCookie

public java.lang.String getCookie()
Specified by:
getCookie in interface org.w3c.dom.html.HTMLDocument
See Also:
HTMLDocumentImpl#getCookie

setCookie

public void setCookie(java.lang.String cookie)
Specified by:
setCookie in interface org.w3c.dom.html.HTMLDocument
See Also:
HTMLDocumentImpl#setCookie

getImages

public org.w3c.dom.html.HTMLCollection getImages()
Specified by:
getImages in interface org.w3c.dom.html.HTMLDocument
See Also:
HTMLDocumentImpl#getImages

getApplets

public org.w3c.dom.html.HTMLCollection getApplets()
Specified by:
getApplets in interface org.w3c.dom.html.HTMLDocument
See Also:
HTMLDocumentImpl#getApplets

getLinks

public org.w3c.dom.html.HTMLCollection getLinks()
Specified by:
getLinks in interface org.w3c.dom.html.HTMLDocument
See Also:
HTMLDocumentImpl#getLinks

getForms

public org.w3c.dom.html.HTMLCollection getForms()
Specified by:
getForms in interface org.w3c.dom.html.HTMLDocument
See Also:
HTMLDocumentImpl#getForms

getAnchors

public org.w3c.dom.html.HTMLCollection getAnchors()
Specified by:
getAnchors in interface org.w3c.dom.html.HTMLDocument
See Also:
HTMLDocumentImpl#getAnchors

open

public void open()
Specified by:
open in interface org.w3c.dom.html.HTMLDocument
See Also:
HTMLDocumentImpl#optn

close

public void close()
Specified by:
close in interface org.w3c.dom.html.HTMLDocument
See Also:
HTMLDocumentImpl#close

write

public void write(java.lang.String text)
Specified by:
write in interface org.w3c.dom.html.HTMLDocument
See Also:
HTMLDocumentImpl#write

writeln

public void writeln(java.lang.String text)
Specified by:
writeln in interface org.w3c.dom.html.HTMLDocument
See Also:
HTMLDocumentImpl#writeln

cloneNode

public org.w3c.dom.Node cloneNode(boolean deep)
Specified by:
cloneNode in interface org.w3c.dom.Node
Overrides:
cloneNode in class org.apache.xerces.dom.DocumentImpl
See Also:
HTMLDocumentImpl#cloneNode


Copyright © 1999-2002 Mark Diekhans, enhydra.org. All Rights reserved.