|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.icl.saxon.trax.serialize.OutputFormat
The output format affects the manner in which a document is serialized. The output format determines the output method, encoding, indentation, document type, and various other properties that affect the manner in which a document is serialized.
Once an output format has been handed to a serializer or XSLT processor, the application should not attempt to reuse it. The serializer or XSLT processor may modify the properties of the output format object.
Implementations may provide classes that extend OutputFormat with additional properties, e.g. indentation level, line separation, namespace handlers, etc. An application may use these extra properties by constructing an output format object based on the implementation specified type.
OutputFormat has been modeled after the XSLT <xsl:output> element declaration. However, it does not assume the existence of an XSLT processor or a particular serializer.
Typical usage scenarios supported by OutputFormat:
Method
Constructor Summary | |
OutputFormat()
Constructs a new output format with the default values. |
Method Summary | |
QName[] |
getCDataElements()
Returns a list of all the elements whose text node children should be output as CDATA. |
java.lang.String |
getDoctypePublicId()
Returns the specified document type public identifier, or null. |
java.lang.String |
getDoctypeSystemId()
Returns the specified document type system identifier, or null. |
java.lang.String |
getEncoding()
Returns the specified encoding. |
boolean |
getIndent()
Returns true if indentation was specified. |
java.lang.String |
getMediaType()
Returns the specified media type. |
java.lang.String |
getMethod()
Returns the method specified for this output format. |
QName[] |
getNonEscapingElements()
Returns a list of all the elements whose text node children should be output unescaped (no character references). |
boolean |
getOmitXMLDeclaration()
Returns true if the XML document declaration should be ommited. |
boolean |
getPreserveSpace()
Returns true if the default behavior for this format is to preserve spaces. |
java.lang.String |
getVersion()
Returns the version for this output method. |
void |
setCDataElements(QName[] cdataElements)
Sets the list of elements for which text node children should be output as CDATA. |
void |
setDoctypePublicId(java.lang.String publicId)
Sets the document type public identifiers. |
void |
setDoctypeSystemId(java.lang.String systemId)
Sets the document type system identifiers. |
void |
setEncoding(java.lang.String encoding)
Sets the encoding for this output method. |
void |
setIndenting(boolean indent)
Sets the indentation on and off. |
void |
setMediaType(java.lang.String mediaType)
Sets the media type. |
void |
setMethod(java.lang.String method)
Sets the method for this output format. |
void |
setNonEscapingElements(QName[] nonEscapingElements)
Sets the list of elements for which text node children should be output unescaped (no character references). |
void |
setOmitXMLDeclaration(boolean omit)
Sets XML declaration omitting on and off. |
void |
setPreserveSpace(boolean preserve)
Sets space preserving as the default behavior. |
void |
setVersion(java.lang.String version)
Sets the version for this output method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OutputFormat()
Method Detail |
public java.lang.String getMethod()
Method
for a list of the default methods. Other methods should
be of the format namespace:local. The default is
Method.XML
.public void setMethod(java.lang.String method)
Method
for
a list of the default methods. Other methods should be of the
format namespace:local.method
- The output method, or nullpublic java.lang.String getVersion()
public void setVersion(java.lang.String version)
version
- The output method version, or nullpublic boolean getIndent()
public void setIndenting(boolean indent)
ident
- True specifies identiationpublic java.lang.String getEncoding()
public void setEncoding(java.lang.String encoding)
encoding
- The encoding, or nullpublic java.lang.String getMediaType()
public void setMediaType(java.lang.String mediaType)
mediaType
- The specified media typepublic void setDoctypePublicId(java.lang.String publicId)
publicId
- The public identifierpublic java.lang.String getDoctypePublicId()
public void setDoctypeSystemId(java.lang.String systemId)
systemId
- The system identifierpublic java.lang.String getDoctypeSystemId()
public boolean getOmitXMLDeclaration()
public void setOmitXMLDeclaration(boolean omit)
omit
- True if XML declaration should be ommitedpublic QName[] getCDataElements()
public void setCDataElements(QName[] cdataElements)
cdataElements
- List of all CDATA elementspublic QName[] getNonEscapingElements()
public void setNonEscapingElements(QName[] nonEscapingElements)
nonEscapingElements
- List of all non-escaping elementspublic boolean getPreserveSpace()
public void setPreserveSpace(boolean preserve)
preserve
- True if spaces should be preserved
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |