public interface OXQSerializationParameters
java.util.Properties instance that can be passed to any standard XQJ method that accepts serialization parameters. For example:
      OXQConnection connection = ...
      OXQSerializationParameters params = connection.createSerializationParameters();
      params.setMethod(OXQSerializationParameters.METHOD_XML);
      params.setIndent(true);
      params.setEncoding("UTF-16");
      XQSequence seq = ...;
      String xml = seq.getSequenceAsString(params.createProperties());
 | Modifier and Type | Field and Description | 
|---|---|
| static javax.xml.namespace.QName | METHOD_HTMLThe HTML Output Method. | 
| static javax.xml.namespace.QName | METHOD_ORACLE_CSXThe CSX Output Method. | 
| static javax.xml.namespace.QName | METHOD_TEXTThe Text Output Method. | 
| static javax.xml.namespace.QName | METHOD_XHTMLThe XHTML Output Method. | 
| static javax.xml.namespace.QName | METHOD_XMLThe XML Output Method. | 
| static int | STANDALONE_NOThe value that indicates  standalone='no'should appear in the document declaration. | 
| static int | STANDALONE_OMITThe value that indicates  standalonewill not appear in the document declaration. | 
| static int | STANDALONE_YESThe value that indicates  standalone='yes'should appear in the document declaration. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addCDATASectionElement(javax.xml.namespace.QName elementName)Adds an element name to the  cdata-section-elementsparameter. | 
| void | addCharacterMapping(int codepoint, java.lang.String replacement)Sets the  use-character-mapsparameter. | 
| void | addSuppressIndentation(javax.xml.namespace.QName elementName)Adds an element name to the  suppress-indentationparameter. | 
| java.util.Properties | createProperties()Exports the current parameters to a  java.util.Propertiesobject that may be used with any standard XQJ method that accepts serialization properties. | 
| int | getBufferSize()Gets the buffer size in bytes that will be used during serialization. | 
| javax.xml.namespace.QName[] | getCDATASectionElements()Gets the  cdata-section-elementsparameter. | 
| java.lang.String | getCharacterMapping(int codepoint)Gets the current character mapping for the specified character. | 
| int[] | getCharacterMappingCodepoints()Gets an array of Unicode characters that are currently replaced by character mappings. | 
| java.lang.String | getDoctypePublic()Gets the  doctype-publicparameter. | 
| java.lang.String | getDoctypeSystem()Gets the  doctype-systemparameter. | 
| java.nio.charset.Charset | getEncoding()Gets the value of the  encodingparameter. | 
| boolean | getEscapeUriAttributes()Gets the value of the  escape-uri-attributesparameter. | 
| java.math.BigDecimal | getHTMLVersion()Gets the value of the  html-versionparameter. | 
| boolean | getIncludeContentType()Gets the value of the  include-content-typeparameter. | 
| java.lang.String | getItemSeparator()Gets the value of the  item-separatorparameter. | 
| javax.activation.MimeType | getMediaType()Gets the value of the  media-typeparameter. | 
| javax.xml.namespace.QName | getMethod()Gets the  methodparameter. | 
| java.text.Normalizer.Form | getNormalizationForm()Gets the  normalization-formparameter. | 
| int | getStandalone()Gets the  standaloneparameter. | 
| javax.xml.namespace.QName[] | getSuppressIndentation()Gets the  suppress-indentationparameter. | 
| java.lang.String | getVersion()Gets the value of the  versionparameter. | 
| boolean | isIndent()Gets the value of the  indentparameter. | 
| boolean | isOmitXMLDeclaration()Gets the  omit-xml-declarationparameter value. | 
| boolean | removeCDATASectionElement(javax.xml.namespace.QName elementName)Removes the element name from the  cdata-section-elementsparameter. | 
| boolean | removeSuppressIndentation(javax.xml.namespace.QName elementName)Removes an element name from the  suppress-indentationparameter. | 
| void | setBufferSize(int buffer)Sets the buffer size that will be used during serialization. | 
| void | setDoctypePublic(java.lang.String doctypePublic)Sets the  doctype-publicparameter. | 
| void | setDoctypeSystem(java.lang.String doctypeSystem)Sets the  doctype-systemparameter. | 
| void | setEncoding(java.nio.charset.Charset encoding)Sets the  encodingparameter. | 
| void | setEncoding(java.lang.String encoding)Sets the  encodingparameter. | 
| void | setEscapeUriAttributes(boolean escapeUriAttributes)Sets the  escape-uri-attributesparameter. | 
| void | setHTMLVersion(java.math.BigDecimal version)Sets the  html-versionparameter. | 
| void | setIncludeContentType(boolean includeContentType)Sets the  include-content-typeparameter. | 
| void | setIndent(boolean indent)Sets the  indentparameter. | 
| void | setItemSeparator(java.lang.String separator)Sets the  item-separatorparameter. | 
| void | setMediaType(javax.activation.MimeType mediaType)Sets the  media-typeparameter. | 
| void | setMethod(javax.xml.namespace.QName method)Sets the  methodparameter. | 
| void | setNormalizationForm(java.text.Normalizer.Form form)Sets  normalization-formparameter. | 
| void | setOmitXMLDeclaration(boolean omitXMLDeclaration)Sets the  omit-xml-declarationparameter. | 
| void | setStandalone(int standalone)Sets the  standaloneparameter which controls the standalone document declaration. | 
| void | setVersion(java.lang.String version)Sets the  versionparameter. | 
static final javax.xml.namespace.QName METHOD_XML
setMethod(QName)static final javax.xml.namespace.QName METHOD_TEXT
setMethod(QName)static final javax.xml.namespace.QName METHOD_HTML
setMethod(QName)static final javax.xml.namespace.QName METHOD_XHTML
setMethod(QName)static final javax.xml.namespace.QName METHOD_ORACLE_CSX
setMethod(QName)static final int STANDALONE_YES
standalone='yes' should appear in the document declaration.setStandalone(int), Constant Field Valuesstatic final int STANDALONE_NO
standalone='no' should appear in the document declaration.setStandalone(int), Constant Field Valuesstatic final int STANDALONE_OMIT
standalone will not appear in the document declaration.setStandalone(int), Constant Field Valuesjava.util.Properties createProperties()
java.util.Properties object that may be used with any standard XQJ method that accepts serialization properties. This conversion requires the parameter values to be represented as strings. The following table describes this conversion. Note, if a parameter is currently set to the default value, it will not have an entry in the result.
| Parameter | String Conversion | Setter | 
|---|---|---|
| method | java.xml.namespace.QName.toString() | setMethod(QName) | 
| encoding | The Charsetname. Seejava.nio.Charset | setEncoding(Charset) | 
| indent | truemaps to"yes"andfalsemaps to"no". | setIndent(boolean) | 
| omit-xml-declaration | truemaps to"yes"andfalsemaps to"no". | setOmitXMLDeclaration(boolean) | 
| standalone | STANDALONE_OMITmaps to"omit",STANDALONE_YESmaps to"yes", andSTANDALONE_NOmaps to"no". | setStandalone(int) | 
| cdata-section-elements | A semicolon separated list of QNames using javax.xml.namespace.QName.toString().For example: "{http://example.org/ns1}one; two; {http://example.org/ns2}three" | addCDATASectionElement(QName) | 
| doctype-public | No conversion needed. | setDoctypePublic(String) | 
| doctype-system | No conversion needed. | setDoctypeSystem(String) | 
| normalization-form | Normalizer.Form.toString().toLowerCase() | setNormalizationForm(Normalizer.Form) | 
| use-character-maps | A comma delimited list of mappings where a mapping is represented by a character followed by '=' followed by any string. More precisely: 
    Mapping ::= [Character] '=' [Character]* 
    Value ::= ( Mapping ( ';' Mapping )* )?
 Note, to use the ';' character in a mapping value, it must be escaped with the characters "\;"For example: "\u03A3=[SIGMA];A=;|=\\;" This example string should be interpreted as a Java literal string. The Unicode character 0x03A3 is replaced with "[SIGMA]", the letter 'A' is replaced with the empty string, and the pipe ('|') is replaced with a semicolon. | addCharacterMapping(int, String) | 
| media-type | The media type (MIME content type). See javax.activation.MimeType | setMediaType(MimeType) | 
| item-separator | No conversion needed. | setItemSeparator(String) | 
| html-version | No conversion needed. | setHTMLVersion(BigDecimal) | 
| include-content-type | truemaps to"yes"andfalsemaps to"no". | setIncludeContentType(boolean) | 
| escape-uri-attributes | truemaps to"yes"andfalsemaps to"no". | setEscapeUriAttributes(boolean) | 
| version | No conversion needed. | setVersion(String) | 
Properties object that may be used with any XQJ serialization methodvoid setMethod(javax.xml.namespace.QName method)
        throws XQException
method parameter. Must be one of METHOD_XML, METHOD_TEXT, or METHOD_ORACLE_CSX. The default value is METHOD_XML.method - the output methodXQException - if the specified method is not supportedjavax.xml.namespace.QName getMethod()
method parameter. The default value is METHOD_XML.setMethod(QName)void setEncoding(java.lang.String encoding)
          throws XQException
encoding parameter. The default encoding is "UTF-8".encoding - the encoding to use. Cannot be nullXQException - if the specified encoding is not a valid Charset name. See java.nio.Charsetvoid setEncoding(java.nio.charset.Charset encoding)
encoding parameter. The default encoding is UTF-8.encoding - the encoding to use. Cannot be nulljava.nio.charset.Charset getEncoding()
encoding parameter. The default encoding is UTF-8.void setIndent(boolean indent)
indent parameter.
When true, the serializer will format the output by inserting and removing whitespace adjacent to elements. For validated instances, the serializer will not modify whitespace in elements where the schema type indicates the content is mixed.
This parameter only applies when the xml output method is used.
false.indent - the value for the indent parameterboolean isIndent()
indent parameter. The default value is false.indent parametervoid setOmitXMLDeclaration(boolean omitXMLDeclaration)
omit-xml-declaration parameter. When set to false, the serializer will write an XML declaration. When set to true, an XML declaration will not be written. The default value is true.omitXMLDeclaration - the value for the omit-xml-declaration parameterboolean isOmitXMLDeclaration()
omit-xml-declaration parameter value. The default value is true.omit-xml-declaration parametervoid setStandalone(int standalone)
            throws XQException
standalone parameter which controls the standalone document declaration. Must be one of STANDALONE_OMIT, STANDALONE_YES, or STANDALONE_NO. The default value is STANDALONE_OMIT.standalone - the standalone parameterXQException - if the specified value is not validint getStandalone()
standalone parameter. The default value is STANDALONE_OMIT.standalone parametervoid setDoctypeSystem(java.lang.String doctypeSystem)
               throws XQException
doctype-system parameter. Setting this causes a document type declaration to be output with the specified system id. The instance being serialized must have a single top level element node and no top level text nodes.doctypeSystem - may not include both an apostrophe (#x27) and a quotation mark (#x22) character. May be nullXQException - if the specified value is invalidjava.lang.String getDoctypeSystem()
doctype-system parameter.doctype-system parameter or null if not setvoid setDoctypePublic(java.lang.String doctypePublic)
               throws XQException
doctype-public parameter. Specifies the public id to be used in the document type declaration. This setting is ignored unless the doctype-system parameter is specified.doctypePublic - http://www.w3.org/TR/REC-xml/#NT-PubidCharXQException - if the specified value is not validjava.lang.String getDoctypePublic()
doctype-public parameter.doctype-public parametervoid setNormalizationForm(java.text.Normalizer.Form form)
normalization-form parameter.form - may be NFC, NFD, NFKC, NFKD, or nulljava.text.Normalizer.Form getNormalizationForm()
normalization-form parameter. A value of null indicates no normalization will be performed. The default value is null."none"void addCharacterMapping(int codepoint,
                         java.lang.String replacement)
use-character-maps parameter. Specifies that a given Unicode character should be replaced with the corresponding string value. This only applies to attribute and text values. Note, the string value used in the replacement will be output "as is". Characters in the string will not be normalized, swapped out with character references, etc. This means that using a character mapping can potentially lead to the production invalid XML documents; for example, if the replacement string contains a mismatched end tag.codepoint - the Unicode codepoint of the character to replacereplacement - the replacement string. If null the mapping will be removed if it already existsint[] getCharacterMappingCodepoints()
null if there are no mappingsaddCharacterMapping(int, String)java.lang.String getCharacterMapping(int codepoint)
codepoint - the Unicode characternull if no mapping existsvoid addCDATASectionElement(javax.xml.namespace.QName elementName)
                     throws XQException
cdata-section-elements parameter. When the parent element of a text node has the specified QName, the text node will be output as a CDATA section.elementName - the element name. Must not be nullXQException - if the local part and prefix of elementName are not valid as NCNameboolean removeCDATASectionElement(javax.xml.namespace.QName elementName)
cdata-section-elements parameter.elementName - the element name to remove. Must not be nulltrue if the parameter contained the specified element and false otherwisejavax.xml.namespace.QName[] getCDATASectionElements()
cdata-section-elements parameter.null if none are definedvoid setBufferSize(int buffer)
buffer - the buffer sizeint getBufferSize()
void setMediaType(javax.activation.MimeType mediaType)
           throws XQException
media-type parameter. There's no default media type. Currently setting media type has no effect on any of the supported serialization methods.mediaType - the media type. Must not be nullXQException - if the specified media type has 'charset' parameter.javax.activation.MimeType getMediaType()
media-type parameter. There's no default media type.null if it's not defined.void setItemSeparator(java.lang.String separator)
item-separator parameter. Use null to make this parameter absent during serialization.separator - the item separator. May be null.java.lang.String getItemSeparator()
item-separator parameter.null if it's not defined.void setHTMLVersion(java.math.BigDecimal version)
html-version parameter. Use null to make this parameter absent during serialization.version - the version value. May be null.java.math.BigDecimal getHTMLVersion()
html-version parameter.null if it's not defined.void setIncludeContentType(boolean includeContentType)
include-content-type parameter.
When true, if there is a head element the serializer will add a meta element as the first child of the head element specifying the character encoding. For example: <META http-equiv="Content-Type" content="text/html; charset=EUC-JP"> If a meta element has been added to the head element as described above, then any existing meta element child of the head element having an http-equiv attribute with the value "Content-Type", making the comparison without regard to case after first stripping leading and trailing spaces from the value of the attribute solely for the purposes of comparison, will be discarded.
This parameter is only applicable when the XHTML or HTML output method is used.
false.includeContentType - the value for the include-content-type parameterboolean getIncludeContentType()
include-content-type parameter. The default value is false.include-content-type parametervoid setEscapeUriAttributes(boolean escapeUriAttributes)
escape-uri-attributes parameter.
When true, the serializer will apply URI escaping to URI attribute values, except that relative URIs will not be absolutized.
This parameter is only applicable when the XHTML or HTML output method is used.
false.escapeUriAttributes - the value for the escape-uri-attributes parameterboolean getEscapeUriAttributes()
escape-uri-attributes parameter. The default value is false.escape-uri-attributes parametervoid setVersion(java.lang.String version)
version parameter. Use null to make this parameter absent during serialization.version - the version value. May be null.java.lang.String getVersion()
version parameter.void addSuppressIndentation(javax.xml.namespace.QName elementName)
                     throws XQException
suppress-indentation parameter. When an element has the specified QName, it and its children will be output as if indent had a value of "no".elementName - the element name. Must not be nullXQException - if the local part and prefix of elementName are not valid as NCNameboolean removeSuppressIndentation(javax.xml.namespace.QName elementName)
suppress-indentation parameter.elementName - the element name to remove. Must not be nulltrue if the parameter contained the specified element and false otherwisejavax.xml.namespace.QName[] getSuppressIndentation()
suppress-indentation parameter.null if none are defined