public abstract class XMLAbstractTranscoder extends AbstractTranscoder
KEY_DOM_IMPLEMENTATION
: the DOM Implementation to use
KEY_DOCUMENT_ELEMENT_NAMESPACE_URI
: the namespace URI of the
document to create
KEY_DOCUMENT_ELEMENT
: the qualified name of the document type
to create
Modifier and Type | Field and Description |
---|---|
static TranscodingHints.Key |
KEY_DOCUMENT_ELEMENT
Document element key.
|
static TranscodingHints.Key |
KEY_DOCUMENT_ELEMENT_NAMESPACE_URI
Document element namespace URI key.
|
static TranscodingHints.Key |
KEY_DOM_IMPLEMENTATION
DOM Implementation key.
|
static TranscodingHints.Key |
KEY_XML_PARSER_CLASSNAME
XML parser classname key.
|
static TranscodingHints.Key |
KEY_XML_PARSER_VALIDATING
The validation mode of the XML parser.
|
handler, hints
Modifier | Constructor and Description |
---|---|
protected |
XMLAbstractTranscoder()
Constructs a new
XMLAbstractTranscoder . |
Modifier and Type | Method and Description |
---|---|
protected DocumentFactory |
createDocumentFactory(DOMImplementation domImpl,
java.lang.String parserClassname)
Creates the
DocumentFactory used to create the DOM
tree. |
protected abstract void |
transcode(Document document,
java.lang.String uri,
TranscoderOutput output)
Transcodes the specified Document in the specified output.
|
void |
transcode(TranscoderInput input,
TranscoderOutput output)
Transcodes the specified XML input in the specified output.
|
addTranscodingHint, getErrorHandler, getTranscodingHints, removeTranscodingHint, setErrorHandler, setTranscodingHints, setTranscodingHints
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addTranscodingHint, getErrorHandler, getTranscodingHints, removeTranscodingHint, setErrorHandler, setTranscodingHints, setTranscodingHints
public static final TranscodingHints.Key KEY_XML_PARSER_CLASSNAME
Key: | KEY_XML_PARSER_CLASSNAME |
---|---|
Value: | String |
Default: | null |
Required: | Yes |
Description: | Specify the XML parser classname to use. |
public static final TranscodingHints.Key KEY_XML_PARSER_VALIDATING
Key: | KEY_XML_PARSER_VALIDATING |
---|---|
Value: | Boolean |
Default: | false |
Required: | No |
Description: | Specify the validation mode of the XML parser. |
public static final TranscodingHints.Key KEY_DOCUMENT_ELEMENT
Key: | KEY_DOCUMENT_ELEMENT |
---|---|
Value: | String |
Default: | null |
Required: | Yes |
Description: | Specify the qualified name of the document type to be created. |
public static final TranscodingHints.Key KEY_DOCUMENT_ELEMENT_NAMESPACE_URI
Key: | KEY_DOCUMENT_ELEMENT_NAMESPACE_URI |
---|---|
Value: | String |
Default: | null |
Required: | Yes |
Description: | Specify the namespace URI of the document element. |
public static final TranscodingHints.Key KEY_DOM_IMPLEMENTATION
Key: | KEY_DOM_IMPLEMENTATION |
---|---|
Value: | String |
Default: | null |
Required: | Yes |
Description: | Specify the DOM Implementation to use. |
protected XMLAbstractTranscoder()
XMLAbstractTranscoder
.public void transcode(TranscoderInput input, TranscoderOutput output) throws TranscoderException
TranscoderException
exceptions not catched previously
are tagged as fatal errors (ie. call the fatalError
method of the ErrorHandler
).input
- the XML input to transcodeoutput
- the ouput where to transcodeTranscoderException
- if an error occured while transcodingprotected DocumentFactory createDocumentFactory(DOMImplementation domImpl, java.lang.String parserClassname)
DocumentFactory
used to create the DOM
tree. Override this method if you have to use another
implementation of the DocumentFactory
(ie. for SVG,
you have to use the SAXSVGDocumentFactory
).domImpl
- the DOM Implementation to useparserClassname
- the XML parser classnameprotected abstract void transcode(Document document, java.lang.String uri, TranscoderOutput output) throws TranscoderException
document
- the document to transcodeuri
- the uri of the document or null if anyoutput
- the ouput where to transcodeTranscoderException
- if an error occured while transcodingCopyright © 2022 Apache Software Foundation. All Rights Reserved.