public final class SerializationOptions extends java.lang.Object implements SerializationSpecifier, java.lang.Cloneable
SerializationSpecifier that can be used for some of the utility
methods in MathMLUtilities.DEFAULT_ENCODING, DEFAULT_INDENT| 构造器和说明 |
|---|
SerializationOptions() |
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.Object |
clone() |
java.lang.String |
getDoctypePublic()
Gets the public identifier to use in the resulting DOCTYPE declaration,
as described in
OutputKeys.DOCTYPE_PUBLIC. |
java.lang.String |
getDoctypeSystem()
Gets the system identifier to use in the resulting DOCTYPE declaration,
as described in
OutputKeys.DOCTYPE_SYSTEM. |
java.lang.String |
getEncoding()
Gets the encoding for the resulting serialized XML.
|
int |
getIndent()
Returns the indentation level to use when
isIndenting() returns true. |
SerializationMethod |
getSerializationMethod()
Gets the
SerializationMethod to use when generating the final output. |
boolean |
isIncludingXMLDeclaration()
Gets whether to include an XML declaration on the resulting output.
|
boolean |
isIndenting()
Returns whether the resulting XML will be indented or not.
|
boolean |
isUsingNamedEntities()
Returns whether to use named entities for certain MathML symbols rather than
numeric character references.
|
void |
setDoctypePublic(java.lang.String doctypePublic)
Sets the public identifier to use in the resulting DOCTYPE declaration,
as described in
OutputKeys.DOCTYPE_PUBLIC. |
void |
setDoctypeSystem(java.lang.String doctypeSystem)
Sets the system identifier to use in the resulting DOCTYPE declaration,
as described in
OutputKeys.DOCTYPE_SYSTEM. |
void |
setEncoding(java.lang.String encoding)
Sets the encoding for the resulting serialized XML.
|
void |
setIncludingXMLDeclaration(boolean includingXMLDeclaration)
Sets whether to include an XML declaration on the resulting output.
|
void |
setIndent(int indent)
Sets the indentation level to use when
isIndenting() returns true. |
void |
setIndenting(boolean indenting)
Sets whether the resulting XML will be indented or not.
|
void |
setSerializationMethod(SerializationMethod serializationMethod)
Sets the
SerializationMethod to use when generating the final output. |
void |
setUsingNamedEntities(boolean usingNamedEntities)
Sets whether to use named entities for certain MathML symbols rather than
numeric character references.
|
java.lang.String |
toString() |
public SerializationMethod getSerializationMethod()
SerializationMethod to use when generating the final output.
Default is SerializationMethod.XML.
This must not be null.
Note that SerializationMethod.XHTML is only supported properly if you are using
an XSLT 2.0 processor; otherwise it reverts to SerializationMethod.XML
getSerializationMethod 在接口中 SerializationSpecifierpublic void setSerializationMethod(SerializationMethod serializationMethod)
SerializationMethod to use when generating the final output.
This must not be null.
Note that SerializationMethod.XHTML is only supported properly if you are using
an XSLT 2.0 processor; otherwise it reverts to SerializationMethod.XML
setSerializationMethod 在接口中 SerializationSpecifierserializationMethod - SerializationMethod to use, which must not be null.public java.lang.String getEncoding()
Default is SerializationSpecifier.DEFAULT_ENCODING.
getEncoding 在接口中 SerializationSpecifierpublic void setEncoding(java.lang.String encoding)
Must not be null.
setEncoding 在接口中 SerializationSpecifierencoding - encoding to use, which must be non-null and recognised by the XSLT
TransformerFactory that will end up doing the serialization.public boolean isIndenting()
Default is false.
isIndenting 在接口中 SerializationSpecifierpublic void setIndenting(boolean indenting)
setIndenting 在接口中 SerializationSpecifierindenting - true to indent, false otherwise.public int getIndent()
isIndenting() returns true.
(This is currently only supported if your underlying XSLT process is either Saxon
or Xalan. This will be the case by if you have chosen to either use Saxon or use
the default processor that ships with your Java platform.)
This must be a non-negative integer.
The default value is SerializationSpecifier.DEFAULT_INDENT.
getIndent 在接口中 SerializationSpecifierpublic void setIndent(int indent)
isIndenting() returns true.
(This is currently only supported if your underlying XSLT process is either Saxon
or Xalan. This will be the case by if you have chosen to either use Saxon or use
the default processor that ships with your Java platform.)
This must be a non-negative integer.
The default value is SerializationSpecifier.DEFAULT_INDENT.
setIndent 在接口中 SerializationSpecifierpublic boolean isIncludingXMLDeclaration()
public void setIncludingXMLDeclaration(boolean includingXMLDeclaration)
setIncludingXMLDeclaration 在接口中 SerializationSpecifierincludingXMLDeclaration - true to include an XML declaration, false otherwise.public boolean isUsingNamedEntities()
Default is false.
isUsingNamedEntities 在接口中 SerializationSpecifierpublic void setUsingNamedEntities(boolean usingNamedEntities)
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!)
setUsingNamedEntities 在接口中 SerializationSpecifierusingNamedEntities - true to use named entities, false to default to using
numeric character references.public java.lang.String getDoctypePublic()
OutputKeys.DOCTYPE_PUBLIC.
Default is null
getDoctypePublic 在接口中 SerializationSpecifierpublic void setDoctypePublic(java.lang.String doctypePublic)
OutputKeys.DOCTYPE_PUBLIC.setDoctypePublic 在接口中 SerializationSpecifierdoctypePublic - public identifier to use, null for no identifier.public java.lang.String getDoctypeSystem()
OutputKeys.DOCTYPE_SYSTEM.
Default is null
getDoctypeSystem 在接口中 SerializationSpecifierpublic void setDoctypeSystem(java.lang.String doctypeSystem)
OutputKeys.DOCTYPE_SYSTEM.setDoctypeSystem 在接口中 SerializationSpecifierdoctypeSystem - system identifier to use, null for no identifier.public java.lang.String toString()
toString 在类中 java.lang.Objectpublic java.lang.Object clone()
clone 在类中 java.lang.Object