Package eu.bandm.tools.doctypes.xhtml
Class Document_body
java.lang.Object
eu.bandm.tools.tdom.runtime.TypedNode<X>
eu.bandm.tools.tdom.runtime.TypedDocument<Element,Extension>
eu.bandm.tools.doctypes.xhtml.Document
eu.bandm.tools.doctypes.xhtml.Document_body
Document with an
Element_body
as its root (=topmost) element.
Of main interest for the programmer are the constructors. These allow to read different external representations. Furthermore, each instance is visitable as a whole.Furthermore, the ID relation is managed by TypedDocument.createDictionary()
.-
Nested Class Summary
Nested classes/interfaces inherited from class eu.bandm.tools.tdom.runtime.TypedNode
TypedNode.ParseListener<E extends TypedElement<?,
?>> -
Field Summary
Fields inherited from class eu.bandm.tools.tdom.runtime.TypedDocument
generationComment, root, STRING_ETHEREAL_SEPARATOR
-
Constructor Summary
ConstructorDescriptionDocument_body
(Element_body root) Create a document in a bottom-up fashion from its toplevel element.Document_body
(SAXEventStream in, Extension ext) Document_body
(InputStream in, Extension ext) Input must be tdom-spec compressed encoding, as written byencode(EncodingOutputStream)
.Document_body
(Document domDocument, Extension ext) Parses an untyped W3C DOM document into a tdom instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected final Element
decode
(DecodingInputStream in, Extension ext) final void
final void
encode
(EncodingOutputStream out, Extension ext) Abstract fall-back method which MUST be overridden and always throws an Exception.Return the top level element.final int
void
Send the visitor to this instance.Methods inherited from class eu.bandm.tools.tdom.runtime.TypedDocument
createDictionary, decode, decodeEthereals, encode, encodeEthereals, end, getDTD, getEtherealContainer, getGenerationComment, getRootUntyped, setGenerationComment, start
Methods inherited from class eu.bandm.tools.tdom.runtime.TypedNode
asBigDecimal, asBigDecimal, asBigDecimal, asBigDecimal, asBigInteger, asBigInteger, asBigInteger, asBigInteger, asBoolean, asBoolean, asDouble, asDouble, asDouble, asDouble, asFloat, asFloat, asFloat, asFloat, asHexInt, asHexInt, asHexInt, asHexInt, asInt, asInt, asInt, asInt, asLong, asLong, asLong, asLong, asTrimmedString, asTrimmedString, asTrimmedString, asTrimmedString, checkPlus, checkPlus, checkStar, checkStar, checkStrict, encode, encodeOptional, encodePlus, encodePlus, encodeStar, encodeStar, extractEthereals, getLocation, getPCData, setLocation, setLocation, setLocation
-
Constructor Details
-
Document_body
@Undocumented Document_body(Document domDocument, Extension ext) throws TdomContentException, TdomAttributeException Parses an untyped W3C DOM document into a tdom instance.- Throws:
TdomContentException
- if content models of contained elements are violated.TdomAttributeException
- if required attributes are missing, or attribute syntax is violated.
-
Document_body
Create a document in a bottom-up fashion from its toplevel element. @param root (never null) top element. -
Document_body
Document_body(SAXEventStream in, Extension ext) throws TdomContentException, TdomXmlException, TdomAttributeException -
Document_body
public Document_body(InputStream in, Extension ext) throws TdomContentException, TdomAttributeException, IOException Input must be tdom-spec compressed encoding, as written byencode(EncodingOutputStream)
. XML text representation requires some XML parser and piping its SAX Events into #Document_body(SAXEventStream)}.
-
-
Method Details
-
getDocumentElement
Return the top level element. @return (never null) the top element. -
host
Description copied from interface:Visitable
Send the visitor to this instance. -
getTagIndex
public final int getTagIndex()- Overrides:
getTagIndex
in classTypedDocument<Element,
Extension>
-
decode
protected final Element decode(DecodingInputStream in, Extension ext) throws TdomContentException, TdomAttributeException, IOException - Specified by:
decode
in classTypedDocument<Element,
Extension> - Throws:
TdomContentException
TdomAttributeException
IOException
-
encode
Description copied from class:TypedNode
Abstract fall-back method which MUST be overridden and always throws an Exception.- Overrides:
encode
in classTypedDocument<Element,
Extension> - Throws:
IOException
-
encode
- Throws:
IOException
-