DOMOutputOptions to add in options for configuring how to build an
serialized output consisting of an XML (or possibly HTML) String using the relevant methods
in SnuggleSession
(e.g. SnuggleSession#buildXMLString(XMLStringOutputOptions)).
DOMOutputOptions, WebPageOutputOptions, WebPageOutputOptionsBuilder
| Modifier and Type | Field and Description |
|---|---|
| private final SerializationOptions |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | getDoctypePublic()
Implements uk. Gets the public identifier to use in the resulting DOCTYPE declaration,
as described in |
| public String | getDoctypeSystem()
Implements uk. Gets the system identifier to use in the resulting DOCTYPE declaration,
as described in |
| public String | getEncoding()
Implements uk. Gets the encoding for the resulting serialized XML. |
| public int | getIndent()
Implements uk. Returns the indentation level to use when |
| public SerializationMethod | getSerializationMethod()
Implements uk. Gets the |
| public boolean | isIncludingXMLDeclaration()
Implements uk. Gets whether to include an XML declaration on the resulting output. |
| public boolean | isIndenting()
Implements uk. Returns whether the resulting XML will be indented or not. |
| public boolean | isUsingNamedEntities()
Implements uk. Returns whether to use named entities for certain MathML symbols rather than numeric character references. |
| public void | setDoctypePublic(String
public identifier to use, null for no identifier. doctypePublic)Implements uk. Sets the public identifier to use in the resulting DOCTYPE declaration,
as described in |
| public void | setDoctypeSystem(String
system identifier to use, null for no identifier. doctypeSystem)Implements uk. Sets the system identifier to use in the resulting DOCTYPE declaration,
as described in |
| public void | setEncoding(String
encoding to use, which must be non-null and recognised by the XSLT
encoding)TransformerFactory that will end up doing the serialization.Implements uk. Sets the encoding for the resulting serialized XML. |
| public void | setIncludingXMLDeclaration(boolean
true to include an XML declaration, false otherwise. includingXMLDeclaration)Implements uk. Sets whether to include an XML declaration on the resulting output. |
| public void | setIndent(int indent)
Implements uk. Sets the indentation level to use when |
| public void | setIndenting(boolean
true to indent, false otherwise. indenting)Implements uk. Sets whether the resulting XML will be indented or not. |
| public void | setSerializationMethod(SerializationMethod
SerializationMethod to use, which must not be null.Implements uk. Sets the |
| public void | setUsingNamedEntities(boolean
true to use named entities, false to default to using
numeric character references. usingNamedEntities)Implements uk. Sets whether to use named entities for certain MathML symbols rather than numeric character references. |
| serializationOptions | back to summary |
|---|---|
| private final SerializationOptions serializationOptions | |
| XMLStringOutputOptions | back to summary |
|---|---|
| public XMLStringOutputOptions() | |
| getDoctypePublic | back to summary |
|---|---|
| public String getDoctypePublic() Implements uk. Gets the public identifier to use in the resulting DOCTYPE declaration,
as described in Default is null | |
| getDoctypeSystem | back to summary |
|---|---|
| public String getDoctypeSystem() Implements uk. Gets the system identifier to use in the resulting DOCTYPE declaration,
as described in Default is null | |
| getEncoding | back to summary |
|---|---|
| public String getEncoding() Implements uk. Gets the encoding for the resulting serialized XML.
Default is | |
| getIndent | back to summary |
|---|---|
| public int getIndent() Implements uk. Returns the indentation level to use when
This must be a non-negative integer.
The default value is
| |
| getSerializationMethod | back to summary |
|---|---|
| public SerializationMethod getSerializationMethod() Implements uk. Gets the
Default is
Note that | |
| isIncludingXMLDeclaration | back to summary |
|---|---|
| public boolean isIncludingXMLDeclaration() Implements uk. Gets whether to include an XML declaration on the resulting output. Default is false. | |
| isIndenting | back to summary |
|---|---|
| public boolean isIndenting() Implements uk. Returns whether the resulting XML will be indented or not. (This depends on how clever the underlying XSLT engine will be!) Default is false. | |
| isUsingNamedEntities | back to summary |
|---|---|
| public boolean isUsingNamedEntities() Implements uk. Returns whether to use named entities for certain MathML symbols rather than numeric character references. Default is false. | |
| setDoctypePublic | back to summary |
|---|---|
| public void setDoctypePublic(String doctypePublic) Implements uk. Sets the public identifier to use in the resulting DOCTYPE declaration,
as described in
| |
| setDoctypeSystem | back to summary |
|---|---|
| public void setDoctypeSystem(String doctypeSystem) Implements uk. Sets the system identifier to use in the resulting DOCTYPE declaration,
as described in
| |
| setEncoding | back to summary |
|---|---|
| public void setEncoding(String encoding) Implements uk. Sets the encoding for the resulting serialized XML. Must not be null.
| |
| setIncludingXMLDeclaration | back to summary |
|---|---|
| public void setIncludingXMLDeclaration(boolean includingXMLDeclaration) Implements uk. Sets whether to include an XML declaration on the resulting output.
| |
| setIndent | back to summary |
|---|---|
| public void setIndent(int indent) Implements uk. Sets the indentation level to use when
This must be a non-negative integer.
The default value is
| |
| setIndenting | back to summary |
|---|---|
| public void setIndenting(boolean indenting) Implements uk. Sets whether the resulting XML will be indented or not. (This depends on how clever the underlying XSLT engine will be!) Note The old version of Xalan that comes bundled with Java 6 (and below) appears to be
unable to indent output when using
| |
| setSerializationMethod | back to summary |
|---|---|
| public void setSerializationMethod(SerializationMethod serializationMethod) Implements uk. Sets the
Note that
| |
| setUsingNamedEntities | back to summary |
|---|---|
| public void setUsingNamedEntities(boolean usingNamedEntities) Implements uk. Sets whether to use named entities for certain MathML symbols rather than numeric character references. Note that this requires an XSLT 2.0-compliant engine (e.g. Saxon, which is in the "full" SnuggleTeX distribution). This option will be silently ignored if you are using an XSLT 1.0 engine, such as the one which typically comes bundled with your JDK. (Also note that the resulting XML won't be parseable unless accompanied with a DTD defining the MathML entities!)
| |