|
API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XOutputParameters
Interface for output parameter settings. Used when exporting
sequences and items. New output parameters objects can be created
through the XFactory.newOutputParameters
method.
These parameters correspond to the ones in the
XSLT 2.0 and XQuery 1.0 Serialization
specification.
XFactory.newOutputParameters()
,
XItemView.exportItem(javax.xml.transform.Result, XOutputParameters)
,
XSequenceCursor.exportSequence(javax.xml.transform.Result, XOutputParameters)
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Field Summary | |
---|---|
static String |
METHOD_HTML
Predefined string for the html output method. |
static String |
METHOD_TEXT
Predefined string for the text output method. |
static String |
METHOD_XHTML
Predefined string for the xhtml output method. |
static String |
METHOD_XML
Predefined string for the xml output method. |
static String |
NORMALIZATION_FORM_C
Predefined string for the normalization form NFC setting. |
static String |
NORMALIZATION_FORM_D
Predefined string for the normalization form NFD setting. |
static String |
NORMALIZATION_FORM_FULLY_NORMALIZED
Predefined string for the normalization form fully-normalized
setting. |
static String |
NORMALIZATION_FORM_KC
Predefined string for the normalization form NFKC setting. |
static String |
NORMALIZATION_FORM_KD
Predefined string for the normalization form NFKD setting. |
static String |
NORMALIZATION_FORM_NONE
Predefined string for the normalization form none
setting. |
static String |
STANDALONE_NO
Predefined string for the standalone no setting. |
static String |
STANDALONE_OMIT
Predefined string for the standalone omit setting. |
static String |
STANDALONE_YES
Predefined string for the standalone yes setting. |
Method Summary | |
---|---|
boolean |
getBackwardsCompatible()
Get the backwards compatible setting. |
boolean |
getByteOrderMark()
Get the byte order mark setting. |
String |
getCDataSectionElements()
Get the comma separated list of CDATA section element names. |
List<String> |
getCharacterMaps()
Get the character mappings. |
String |
getDoctypePublic()
Get the public identifier to be used in the document type declaration. |
String |
getDoctypeSystem()
Get the system identifier to be used in the document type declaration. |
String |
getEncoding()
Get the character encoding. |
boolean |
getEscapeURIAttributes()
Get the escape URI attributes setting. |
boolean |
getIncludeContentType()
Get the include content type setting. |
boolean |
getIndent()
Get the indent setting. |
int |
getIndentAmount()
Get the indent amount. |
String |
getMediaType()
Get the media type. |
String |
getMethod()
Get the output method. |
String |
getNormalizationForm()
Get the normalization form. |
boolean |
getOmitXMLDeclaration()
Get the omit XML declaration setting. |
String |
getStandalone()
Get the standalone setting. |
boolean |
getUndeclarePrefixes()
Get the undeclare prefixes setting. |
String |
getVersion()
Get the output method version. |
void |
setBackwardsCompatible(boolean setting)
Specify whether backwards compatible mode is enabled or not. |
void |
setByteOrderMark(boolean setting)
Specifiy whether a byte order mark should be written at the start of the serialized output. |
void |
setCDataSectionElements(String elements)
Specify a comma separated list of the names of elements whose text node children should be serialized using CDATA sections. |
void |
setCharacterMaps(List<String> characterMaps)
Specify character mappings. |
void |
setDoctypePublic(String id)
Specify the public identifier to be used in the document type declaration. |
void |
setDoctypeSystem(String id)
Specify the system identifier to be used in the document type declaration. |
void |
setEncoding(String encoding)
Specify the preferred character encoding to use when encoding sequences of characters as sequences of bytes. |
void |
setEscapeURIAttributes(boolean setting)
Specify whether to escape URI attributes. |
void |
setIncludeContentType(boolean setting)
Specify whether a meta element is to be added as
the first child of the html element specifying the
character encoding used. |
void |
setIndent(boolean setting)
Specify whether additional whitespace may be added during serialization. |
void |
setIndentAmount(int amount)
Set the indent amount (number of spaces to use when indenting). |
void |
setMediaType(String mediaType)
Specify the media type (MIME content type). |
void |
setMethod(String method)
Specify the output method to be used by the serializer. |
void |
setNormalizationForm(String normalizationForm)
Specify whether Unicode normalization should be applied. |
void |
setOmitXMLDeclaration(boolean setting)
Specify whether to omit the XML declaration. |
void |
setStandalone(String standalone)
Specify whether to output a standalone document declaration. |
void |
setUndeclarePrefixes(boolean setting)
Specify whether namespace undeclarations (of the form xmlns:foo="") should be output when a child element has no namespace node with the same name (that is, namespace prefix) as a namespace node of its parent element. |
void |
setVersion(String version)
Set the version for the output method. |
Methods inherited from interface java.util.Map |
---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Field Detail |
---|
static final String METHOD_XML
xml
output method.
setMethod(String)
,
Constant Field Valuesstatic final String METHOD_HTML
html
output method.
setMethod(String)
,
Constant Field Valuesstatic final String METHOD_XHTML
xhtml
output method.
setMethod(String)
,
Constant Field Valuesstatic final String METHOD_TEXT
text
output method.
setMethod(String)
,
Constant Field Valuesstatic final String STANDALONE_OMIT
omit
setting.
setStandalone(String)
,
Constant Field Valuesstatic final String STANDALONE_YES
yes
setting.
setStandalone(String)
,
Constant Field Valuesstatic final String STANDALONE_NO
no
setting.
setStandalone(String)
,
Constant Field Valuesstatic final String NORMALIZATION_FORM_C
NFC
setting.
setNormalizationForm(String)
,
Constant Field Valuesstatic final String NORMALIZATION_FORM_D
NFD
setting.
setNormalizationForm(String)
,
Constant Field Valuesstatic final String NORMALIZATION_FORM_KC
NFKC
setting.
setNormalizationForm(String)
,
Constant Field Valuesstatic final String NORMALIZATION_FORM_KD
NFKD
setting.
setNormalizationForm(String)
,
Constant Field Valuesstatic final String NORMALIZATION_FORM_FULLY_NORMALIZED
fully-normalized
setting.
setNormalizationForm(String)
,
Constant Field Valuesstatic final String NORMALIZATION_FORM_NONE
none
setting.
setNormalizationForm(String)
,
Constant Field ValuesMethod Detail |
---|
void setBackwardsCompatible(boolean setting)
setting
- The setting, either true
to enable backwards
compatibility or false
to disable it. The default is
false
.boolean getBackwardsCompatible()
true
if enabled,
false
otherwise.void setByteOrderMark(boolean setting)
setting
- The setting. The default is false
.boolean getByteOrderMark()
void setCDataSectionElements(String elements)
{\}\
. For example:
{http://my.org}myelem
.
elements
- The list of element names or null
to reset.String getCDataSectionElements()
void setDoctypePublic(String id)
id
- The public identifier or null
to reset.String getDoctypePublic()
null
if not set.void setDoctypeSystem(String id)
id
- The system identifier or null
to reset.String getDoctypeSystem()
null
if not set.void setEncoding(String encoding)
encoding
- The encoding to use or null
to reset.
Case will be ignored.
Must only contain characters between #x21 and #x7E (printable
ASCII characters). The value must be a charset registered
with the Internet Assigned Numbers Authority
( IANA Charset ).String getEncoding()
null
if not set.void setEscapeURIAttributes(boolean setting)
setting
- The escape URI attributes setting, true
to enable URI escaping, false
to disable it.
The default is false
.boolean getEscapeURIAttributes()
void setIncludeContentType(boolean setting)
meta
element is to be added as
the first child of the html
element specifying the
character encoding used. This setting only affects the html
and xhtml output methods.
setting
- The setting, either true
to add
the meta
element or false
to not add it.
The default is false
.boolean getIncludeContentType()
void setIndent(boolean setting)
Specify whether additional whitespace may be added during
serialization. For xml
output this whitespace will only be added
where it would be considered strippable by an XML parser.
The amount of indentation is controlled by the setIndentAmount
method. The default indentation is 2 spaces.
setting
- The setting, true
to enable
indentation, false
to disable it. The default
is false
for xml
output method and true
for the html
and xhtml
output methods. The indent setting
is ignored for the text
output method.setIndentAmount(int)
boolean getIndent()
void setMediaType(String mediaType)
mediaType
- The media type or null
to reset.
The default is text/xml
for the xml
output method, text/html
for
the html
and xhtml
output methods, and
text/plain
for the text
output method.String getMediaType()
null
if not set.void setMethod(String method)
Specify the output method to be used by the serializer.
method
- The output method as one of xml
,
html
, xhtml
or text
or as a lexical QName
({\}\
or \
if there is no namespace), or null
to reset.
Predefined strings are available for the 4 basic methods:
method
- The method.METHOD_XML
,
METHOD_HTML
,
METHOD_XHTML
,
METHOD_TEXT
String getMethod()
null
if not set.void setNormalizationForm(String normalizationForm)
normalization-form
serialization parameter:
NORMALIZATION_FORM_C
, NORMALIZATION_FORM_D
,
NORMALIZATION_FORM_KC
, NORMALIZATION_FORM_KD
,
NORMALIZATION_FORM_FULLY_NORMALIZED
and
NORMALIZATION_FORM_NONE
normalizationForm
- The requested normalization form - one of the
strings NFC
, NFD
, NFKC
, NFKD
,
fully-normalized
or none
. The default is
none
.String getNormalizationForm()
none
if not set.void setOmitXMLDeclaration(boolean setting)
setting
- The setting, true
to omit the
XML declaration, false
setting
- The setting.boolean getOmitXMLDeclaration()
void setStandalone(String standalone)
Specify whether to output a standalone document declaration.
standalone
- Must be one of omit
to omit
the standalone declaration, yes
to include
the standalone declaration with the value yes
, or
no
to include the standalone declaration with the
value no
. The default is omit
.
Pass in null
to reset.
Predefined strings are available for the 3 choices:
standalone
- The standalone setting.
IllegalArgumentException
- if the value of the standalone
parameter is invalid.STANDALONE_OMIT
,
STANDALONE_YES
,
STANDALONE_NO
String getStandalone()
null
if not set.void setCharacterMaps(List<String> characterMaps)
characterMaps
- A List
of String
pairs
where the first String
of each pair is a single
unicode character and the second String
of each pair
is the unicode characters to which the first character will be
mapped. Pass in null
to reset.List<String> getCharacterMaps()
null
if not set.void setUndeclarePrefixes(boolean setting)
xml
and the version is set to
"1.1" or higher.
setting
- The setting, true
to enable
undeclaring of prefixes, false
otherwise.
The default is false
.boolean getUndeclarePrefixes()
void setVersion(String version)
version
- The version as a String
.String getVersion()
void setIndentAmount(int amount)
setIndent
method).
amount
- The indent amount. Must be a positive integer.
The default is 2.
IllegalArgumentException
- if the amount
is not a positive integer.setIndent(boolean)
int getIndentAmount()
|
IBM Copyright 2004-2008 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |