org.enhydra.xml.xmlc.dom.xerces
Class XercesHTMLDomFactory

java.lang.Object
  |
  +--org.enhydra.xml.xmlc.dom.xerces.XercesDomFactory
        |
        +--org.enhydra.xml.xmlc.dom.xerces.XercesHTMLDomFactory
All Implemented Interfaces:
XMLCDomFactory

public class XercesHTMLDomFactory
extends XercesDomFactory
implements XMLCDomFactory

XMLC DOM factory for creating HTML Document objects based on the Xerces DOM.


Nested Class Summary
 class XercesHTMLDomFactory.LinkedXercesDocument
          Deprecated. Remains for compaitiblity with objects compiled with XMLC 2.0.1
 
Nested classes inherited from class org.enhydra.xml.xmlc.dom.xerces.XercesDomFactory
XercesDomFactory.LinkedXercesDocument
 
Constructor Summary
XercesHTMLDomFactory()
           
 
Method Summary
 org.w3c.dom.Document createDocument(java.lang.String namespaceURI, java.lang.String qualifiedName, org.w3c.dom.DocumentType docType)
          This creates a Document object that extends the Xerces HTMLDocument class and implements XMLObjectLink.
 java.lang.String getBaseClassName()
          Get the base class name for generated classes.
 java.lang.String[] getElementClassNames(org.w3c.dom.Element element)
          Extract the class names for an element.
 java.lang.String[] getInterfaceNames()
          Get the interface names that will automatically be added to all generated classes and interfaces.
 java.lang.String getMIMEType()
          Get the MIME type to associated with the document, or null if none should be associated.
 boolean isURLAttribute(org.w3c.dom.Element element, java.lang.String attrName)
          Determine if an an attribute of an element may contain a URL and should be subject to URL editing at compile time(or rewriting at run time.
 
Methods inherited from class org.enhydra.xml.xmlc.dom.xerces.XercesDomFactory
createAccessorGenerator, createDocBuilderGenerator, createDocumentType, nodeClassToInterface
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.enhydra.xml.xmlc.dom.XMLCDomFactory
createAccessorGenerator, createDocBuilderGenerator, createDocumentType, nodeClassToInterface
 

Constructor Detail

XercesHTMLDomFactory

public XercesHTMLDomFactory()
Method Detail

createDocument

public org.w3c.dom.Document createDocument(java.lang.String namespaceURI,
                                           java.lang.String qualifiedName,
                                           org.w3c.dom.DocumentType docType)
This creates a Document object that extends the Xerces HTMLDocument class and implements XMLObjectLink.

Specified by:
createDocument in interface XMLCDomFactory
Overrides:
createDocument in class XercesDomFactory
Parameters:
namespaceURI - The namespace URI of the document element to create, or null.
qualifiedName - The document type name (same as the root element). Maybe null for HTML documents or documents without DTDs.
docType - The type of document to be created or null. When doctype is not null, its Node.ownerDocument attribute is set to the document being created. Maybe null for for documents without DTDs or HTML documents.
Returns:
A new Document object.
See Also:
XMLCDomFactory.createDocument(java.lang.String, java.lang.String, org.w3c.dom.DocumentType)

getMIMEType

public java.lang.String getMIMEType()
Description copied from interface: XMLCDomFactory
Get the MIME type to associated with the document, or null if none should be associated.

Specified by:
getMIMEType in interface XMLCDomFactory
Overrides:
getMIMEType in class XercesDomFactory
See Also:
XMLCDomFactory.getMIMEType()

getBaseClassName

public java.lang.String getBaseClassName()
Description copied from interface: XMLCDomFactory
Get the base class name for generated classes. It must extend XMLObjectImpl. This class maybe overridden for individual documents that are compiled.

Specified by:
getBaseClassName in interface XMLCDomFactory
Overrides:
getBaseClassName in class XercesDomFactory
See Also:
XMLCDomFactory.getBaseClassName()

getInterfaceNames

public java.lang.String[] getInterfaceNames()
Description copied from interface: XMLCDomFactory
Get the interface names that will automatically be added to all generated classes and interfaces. This class maybe overridden for individual documents that are compiled. It XMLObject is not part of the list, it will be added automatically.

Specified by:
getInterfaceNames in interface XMLCDomFactory
Overrides:
getInterfaceNames in class XercesDomFactory
Returns:
An array of fully-qualified interface names, or null if none, other than XMLObject, are to be added.
See Also:
XMLCDomFactory.getInterfaceNames()

getElementClassNames

public java.lang.String[] getElementClassNames(org.w3c.dom.Element element)
Description copied from interface: XMLCDomFactory
Extract the class names for an element. This is a class for grouping elements, not the Java class. In HTML, the class is specified with the class attribute and with a value of a white-space separated list of class names. Its not specified for XML, however this method can be implemented in DTD-specifc XMLDomFactories to enable this functionality.

Specified by:
getElementClassNames in interface XMLCDomFactory
Overrides:
getElementClassNames in class XercesDomFactory
Returns:
An array of class names or null if the node has no classes. XML returns null.
See Also:
XMLCDomFactory.getElementClassNames(org.w3c.dom.Element)

isURLAttribute

public boolean isURLAttribute(org.w3c.dom.Element element,
                              java.lang.String attrName)
Description copied from interface: XMLCDomFactory
Determine if an an attribute of an element may contain a URL and should be subject to URL editing at compile time(or rewriting at run time. This method is required, as there is not way to define this in a XML DTD. With HTML, the attributes returned should have values of type %URL, %URI or %Script.

Specified by:
isURLAttribute in interface XMLCDomFactory
Overrides:
isURLAttribute in class XercesDomFactory
Parameters:
element - The element object the attribute is associated with.
attrName - The name of the attribute.
Returns:
True if the attribute may contain a URL (although it could contain JavaScript, etc. False if it can't and shouldn't be edited.
See Also:
XMLCDomFactory.isURLAttribute(org.w3c.dom.Element, java.lang.String)


Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.