com.ibm.xml.xapi

Interface XOutputParameters

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K,V>
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String METHOD_HTML
      Predefined string for the html output method.
      static java.lang.String METHOD_TEXT
      Predefined string for the text output method.
      static java.lang.String METHOD_XHTML
      Predefined string for the xhtml output method.
      static java.lang.String METHOD_XML
      Predefined string for the xml output method.
      static java.lang.String NORMALIZATION_FORM_C
      Predefined string for the normalization form NFC setting.
      static java.lang.String NORMALIZATION_FORM_D
      Predefined string for the normalization form NFD setting.
      static java.lang.String NORMALIZATION_FORM_FULLY_NORMALIZED
      Predefined string for the normalization form fully-normalized setting.
      static java.lang.String NORMALIZATION_FORM_KC
      Predefined string for the normalization form NFKC setting.
      static java.lang.String NORMALIZATION_FORM_KD
      Predefined string for the normalization form NFKD setting.
      static java.lang.String NORMALIZATION_FORM_NONE
      Predefined string for the normalization form none setting.
      static java.lang.String STANDALONE_NO
      Predefined string for the standalone no setting.
      static java.lang.String STANDALONE_OMIT
      Predefined string for the standalone omit setting.
      static java.lang.String STANDALONE_YES
      Predefined string for the standalone yes setting.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      boolean getBackwardsCompatible()
      Get the backwards compatible setting.
      boolean getByteOrderMark()
      Get the byte order mark setting.
      java.lang.String getCDataSectionElements()
      Get the comma separated list of CDATA section element names.
      java.util.List<java.lang.String> getCharacterMaps()
      Get the character mappings.
      java.lang.String getDoctypePublic()
      Get the public identifier to be used in the document type declaration.
      java.lang.String getDoctypeSystem()
      Get the system identifier to be used in the document type declaration.
      java.lang.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.
      java.lang.String getMediaType()
      Get the media type.
      java.lang.String getMethod()
      Get the output method.
      java.lang.String getNormalizationForm()
      Get the normalization form.
      boolean getOmitXMLDeclaration()
      Get the omit XML declaration setting.
      java.lang.String getStandalone()
      Get the standalone setting.
      boolean getUndeclarePrefixes()
      Get the undeclare prefixes setting.
      java.lang.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(java.lang.String elements)
      Specify a comma separated list of the names of elements whose text node children should be serialized using CDATA sections.
      void setCharacterMaps(java.util.List<java.lang.String> characterMaps)
      Specify character mappings.
      void setDoctypePublic(java.lang.String id)
      Specify the public identifier to be used in the document type declaration.
      void setDoctypeSystem(java.lang.String id)
      Specify the system identifier to be used in the document type declaration.
      void setEncoding(java.lang.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(java.lang.String mediaType)
      Specify the media type (MIME content type).
      void setMethod(java.lang.String method)
      Specify the output method to be used by the serializer.
      void setNormalizationForm(java.lang.String normalizationForm)
      Specify whether Unicode normalization should be applied.
      void setOmitXMLDeclaration(boolean setting)
      Specify whether to omit the XML declaration.
      void setStandalone(java.lang.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(java.lang.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
    • Method Detail

      • setBackwardsCompatible

        void setBackwardsCompatible(boolean setting)
        Specify whether backwards compatible mode is enabled or not. If enabled and no ouptut method is specified, xml will be used as a default. If disabled, the rules of XSLT 2.0 will be followed when no output method is specified.
        Parameters:
        setting - The setting, either true to enable backwards compatibility or false to disable it. The default is false.
      • getBackwardsCompatible

        boolean getBackwardsCompatible()
        Get the backwards compatible setting.
        Returns:
        The backwards compatible setting, true if enabled, false if disabled.
      • setByteOrderMark

        void setByteOrderMark(boolean setting)
        Specifiy whether a byte order mark should be written at the start of the serialized output.
        Parameters:
        setting - The setting. The default is false.
      • getByteOrderMark

        boolean getByteOrderMark()
        Get the byte order mark setting.
        Returns:
        The setting.
      • setCDataSectionElements

        void setCDataSectionElements(java.lang.String elements)
        Specify a comma separated list of the names of elements whose text node children should be serialized using CDATA sections. Names are specified as lexical QNames ( {<namespace>}<localname> or <localname> if there is no namespace). For example: {http://my.org}myelem.
        Parameters:
        elements - The list of element names or null to reset.
      • getCDataSectionElements

        java.lang.String getCDataSectionElements()
        Get the comma separated list of CDATA section element names.
        Returns:
        The list of CDATA section element names.
      • setDoctypePublic

        void setDoctypePublic(java.lang.String id)
        Specify the public identifier to be used in the document type declaration.
        Parameters:
        id - The public identifier or null to reset.
      • getDoctypePublic

        java.lang.String getDoctypePublic()
        Get the public identifier to be used in the document type declaration.
        Returns:
        The public identifier or null if not set.
      • setDoctypeSystem

        void setDoctypeSystem(java.lang.String id)
        Specify the system identifier to be used in the document type declaration.
        Parameters:
        id - The system identifier or null to reset.
      • getDoctypeSystem

        java.lang.String getDoctypeSystem()
        Get the system identifier to be used in the document type declaration.
        Returns:
        The system identifier or null if not set.
      • setEncoding

        void setEncoding(java.lang.String encoding)
        Specify the preferred character encoding to use when encoding sequences of characters as sequences of bytes. If no encoding is specified then utf-8 is assumed.
        Parameters:
        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 ).
      • getEncoding

        java.lang.String getEncoding()
        Get the character encoding.
        Returns:
        The character encoding or null if not set.
      • setEscapeURIAttributes

        void setEscapeURIAttributes(boolean setting)
        Specify whether to escape URI attributes. This setting only affects the html and xhtml output methods.
        Parameters:
        setting - The escape URI attributes setting, true to enable URI escaping, false to disable it. The default is false.
      • getEscapeURIAttributes

        boolean getEscapeURIAttributes()
        Get the escape URI attributes setting.
        Returns:
        The escape URI attributes setting.
      • setIncludeContentType

        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. This setting only affects the html and xhtml output methods.
        Parameters:
        setting - The setting, either true to add the meta element or false to not add it. The default is false.
      • getIncludeContentType

        boolean getIncludeContentType()
        Get the include content type setting.
        Returns:
        The include content type setting.
      • setIndent

        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.

        Parameters:
        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.
        See Also:
        setIndentAmount(int)
      • getIndent

        boolean getIndent()
        Get the indent setting.
        Returns:
        The indent setting.
      • setMediaType

        void setMediaType(java.lang.String mediaType)
        Specify the media type (MIME content type).
        Parameters:
        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.
      • getMediaType

        java.lang.String getMediaType()
        Get the media type.
        Returns:
        The media type or null if not set.
      • setMethod

        void setMethod(java.lang.String method)

        Specify the output method to be used by the serializer. If no output method is specified then the xml output method is assumed.

        Parameters:
        method - The output method as one of xml, html, xhtml or text or as a lexical QName ({<namespace>}<localname> or <localname> if there is no namespace), or null to reset.

        Predefined strings are available for the 4 basic methods:

        • METHOD_XML
        • METHOD_HTML
        • METHOD_XHTML
        • METHOD_XML

        See Also:
        METHOD_XML, METHOD_HTML, METHOD_XHTML, METHOD_TEXT
      • getMethod

        java.lang.String getMethod()
        Get the output method.
        Returns:
        The output method or null if not set.
      • getNormalizationForm

        java.lang.String getNormalizationForm()
        Get the normalization form.
        Returns:
        The normalization form or the string none if not set.
      • setOmitXMLDeclaration

        void setOmitXMLDeclaration(boolean setting)
        Specify whether to omit the XML declaration.
        Parameters:
        setting - The setting, true to omit the XML declaration, false otherwise. The default is false.
      • getOmitXMLDeclaration

        boolean getOmitXMLDeclaration()
        Get the omit XML declaration setting.
        Returns:
        The omit XML declaration setting.
      • setStandalone

        void setStandalone(java.lang.String standalone)

        Specify whether to output a standalone document declaration.

        Parameters:
        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.

        Predefined strings are available for the 3 choices:

        • STANDALONE_OMIT
        • STANDALONE_YES
        • STANDALONE_NO

        Throws:
        java.lang.IllegalArgumentException - if the value of the standalone parameter is invalid.
        See Also:
        STANDALONE_OMIT, STANDALONE_YES, STANDALONE_NO
      • getStandalone

        java.lang.String getStandalone()
        Get the standalone setting.
        Returns:
        The standalone setting or null if not set.
      • setCharacterMaps

        void setCharacterMaps(java.util.List<java.lang.String> characterMaps)
        Specify character mappings.
        Parameters:
        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.
      • getCharacterMaps

        java.util.List<java.lang.String> getCharacterMaps()
        Get the character mappings.
        Returns:
        The character mappings or null if not set.
      • setUndeclarePrefixes

        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. This setting is relevant only when the output method is set to xml and the version is set to "1.1" or higher.
        Parameters:
        setting - The setting, true to enable undeclaring of prefixes, false to disable this feature. The default is false.
      • getUndeclarePrefixes

        boolean getUndeclarePrefixes()
        Get the undeclare prefixes setting.
        Returns:
        The undeclare prefixes setting.
      • setVersion

        void setVersion(java.lang.String version)
        Set the version for the output method. The value of this parameter specifies the version of the output method to use. For XML output the default value is "1.0". For HTML output the default value is "4.01".
        Parameters:
        version - The version as a String.
      • getVersion

        java.lang.String getVersion()
        Get the output method version.
        Returns:
        The output method version.
      • setIndentAmount

        void setIndentAmount(int amount)
        Set the indent amount (number of spaces to use when indenting). This parameter will only take effect if indentation is enabled (see the setIndent method).
        Parameters:
        amount - The indent amount. Must be a positive integer. The default is 2.
        Throws:
        java.lang.IllegalArgumentException - if the amount is not a positive integer.
        See Also:
        setIndent(boolean)
      • getIndentAmount

        int getIndentAmount()
        Get the indent amount.
        Returns:
        The indent amount.
IBM WebSphere Application Server XML API JavadocTM
Release 8.5