Enum Serializer.Property

java.lang.Object
java.lang.Enum<Serializer.Property>
net.sf.saxon.s9api.Serializer.Property
All Implemented Interfaces:
Serializable, Comparable<Serializer.Property>, java.lang.constant.Constable
Enclosing class:
Serializer

public static enum Serializer.Property extends Enum<Serializer.Property>
Enumeration class defining the permitted serialization properties
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Build-tree option (XSLT only), "yes" or "no"
    Set to "yes" or "no" to indicate whether a byte order mark is to be written
    Space-separated list of QNames (in Clark form or EQName form) of elements whose content is to be wrapped in CDATA sections
    Set to any string to indicate that the output is to include a DOCTYPE declaration with this public id
    Set to any string to indicate that the output is to include a DOCTYPE declaration with this system id
    Character encoding of output stream
    Set to "yes" or "no" to indicate (for HTML and XHTML) whether URI-valued attributes should be percent-encoded
    HTML version number
    For HTML and XHTML, set to "yes" or "no" to indicate whether a <meta> element is to be written to indicate the content type and encoding
    Set to "yes" or "no" to indicate whether indentation is required
    Set to a string used to separate adjacent items in an XQuery result sequence
    Set to indicate the media type (MIME type) of the output
    Serialization method: xml, html, xhtml, text, json, adaptive; or Q{uri}local
    Set to the name of a Unicode normalization form: "NFC", "NFD", "NFKC", or "NFKD", or "none" to indicate no normalization
    Set to "yes" if the XML declaration is to be omitted from the output file
    Saxon extension: set to a space-separated list of attribute names, in Clark or EQName notation, followed optionally by "*" and then another space-separated list of attribute names indicating that attributes present in the list should be serialized in the order indicated: specific attributes listed before the "*" come first in the order specified; then attributes not present in the list (these are sorted first by namespace, then by local name), and finally specific attributes listed after the "*", in the order specified.
    Saxon extension: request canonical XML output.
    Saxon extension to indicate how characters outside the encoding should be represented, for example "hex" for hexadecimal character references, "decimal" for decimal character references
    Saxon extension: set to a space-separated list of element names, in Clark or EQName notation, representing elements that will be preceded by an extra blank line in the output in addition to normal indentation.
    Saxon extension: set to an integer (represented as a string) giving the number of spaces by which each level of nesting should be indented.
    Saxon extension: set to a string containing the internal DTD subset, which is output "as is", without any checking.
    Saxon extension: set to an integer (represented as a string) giving the desired maximum length of lines when indenting.
    Saxon extension: set to any string.
    Saxon extension for use when writing to the text output method; this option causes the processing instructions hex and b64 to be recognized as containing hexBinary or base64 data respectively.
    Saxon extension for use when output is sent to a SAX ContentHandler: indicates that the output is required to be well-formed (exactly one top-level element, no top-level text nodes)
    Saxon extension for internal use: used in XSLT to tell the serializer whether the stylesheet used version="1.0" or version="2.0" (etc).
    Saxon extension for interfacing with debuggers; indicates that location information is available for events in this output stream
    Set to a space-separated list of element names (in Clark or EQName notation), identifying elements (such as para) within which no content is to be indented.
    Saxon extension, indicates that the output of a query is to be wrapped before serialization, such that each item in the result sequence is enclosed in an element indicating its type
    Set to "yes", "no", or "omit" to indicate the required value of the standalone attribute in the XML declaration of the output file
    Set to "yes" or "no" to indicate (for XML 1.1) whether namespaces that go out of scope should be undeclared
    List of names of character maps to be used.
    Version of output method, for example "1.0" or "1.1" for XML
  • Method Summary

    Modifier and Type
    Method
    Description
     
    Get the name of the property expressed as a QName.
    Get the name of the property expressed as a QName in Clark notation.
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • METHOD

      public static final Serializer.Property METHOD
      Serialization method: xml, html, xhtml, text, json, adaptive; or Q{uri}local
    • VERSION

      public static final Serializer.Property VERSION
      Version of output method, for example "1.0" or "1.1" for XML
    • ENCODING

      public static final Serializer.Property ENCODING
      Character encoding of output stream
    • OMIT_XML_DECLARATION

      public static final Serializer.Property OMIT_XML_DECLARATION
      Set to "yes" if the XML declaration is to be omitted from the output file
    • STANDALONE

      public static final Serializer.Property STANDALONE
      Set to "yes", "no", or "omit" to indicate the required value of the standalone attribute in the XML declaration of the output file
    • DOCTYPE_PUBLIC

      public static final Serializer.Property DOCTYPE_PUBLIC
      Set to any string to indicate that the output is to include a DOCTYPE declaration with this public id
    • DOCTYPE_SYSTEM

      public static final Serializer.Property DOCTYPE_SYSTEM
      Set to any string to indicate that the output is to include a DOCTYPE declaration with this system id
    • CDATA_SECTION_ELEMENTS

      public static final Serializer.Property CDATA_SECTION_ELEMENTS
      Space-separated list of QNames (in Clark form or EQName form) of elements whose content is to be wrapped in CDATA sections
    • INDENT

      public static final Serializer.Property INDENT
      Set to "yes" or "no" to indicate whether indentation is required
    • MEDIA_TYPE

      public static final Serializer.Property MEDIA_TYPE
      Set to indicate the media type (MIME type) of the output
    • USE_CHARACTER_MAPS

      public static final Serializer.Property USE_CHARACTER_MAPS
      List of names of character maps to be used. Character maps can only be specified in an XSLT stylesheet. Supplied as a space-separated list of QNames in Clark or EQName format.
    • INCLUDE_CONTENT_TYPE

      public static final Serializer.Property INCLUDE_CONTENT_TYPE
      For HTML and XHTML, set to "yes" or "no" to indicate whether a <meta> element is to be written to indicate the content type and encoding
    • UNDECLARE_PREFIXES

      public static final Serializer.Property UNDECLARE_PREFIXES
      Set to "yes" or "no" to indicate (for XML 1.1) whether namespaces that go out of scope should be undeclared
    • ESCAPE_URI_ATTRIBUTES

      public static final Serializer.Property ESCAPE_URI_ATTRIBUTES
      Set to "yes" or "no" to indicate (for HTML and XHTML) whether URI-valued attributes should be percent-encoded
    • BYTE_ORDER_MARK

      public static final Serializer.Property BYTE_ORDER_MARK
      Set to "yes" or "no" to indicate whether a byte order mark is to be written
    • NORMALIZATION_FORM

      public static final Serializer.Property NORMALIZATION_FORM
      Set to the name of a Unicode normalization form: "NFC", "NFD", "NFKC", or "NFKD", or "none" to indicate no normalization
    • ITEM_SEPARATOR

      public static final Serializer.Property ITEM_SEPARATOR
      Set to a string used to separate adjacent items in an XQuery result sequence
    • HTML_VERSION

      public static final Serializer.Property HTML_VERSION
      HTML version number
    • BUILD_TREE

      public static final Serializer.Property BUILD_TREE
      Build-tree option (XSLT only), "yes" or "no"
    • SAXON_INDENT_SPACES

      public static final Serializer.Property SAXON_INDENT_SPACES
      Saxon extension: set to an integer (represented as a string) giving the number of spaces by which each level of nesting should be indented. Default is 3.
    • SAXON_INTERNAL_DTD_SUBSET

      public static final Serializer.Property SAXON_INTERNAL_DTD_SUBSET
      Saxon extension: set to a string containing the internal DTD subset, which is output "as is", without any checking. The content should correspond to the rules for the intSubset production in the XML 1.1 grammar (note that this excludes the square-bracket delimiters). See also the saxon:doctype instruction, which allows the internal subset to be constructed programmatically.
    • SAXON_LINE_LENGTH

      public static final Serializer.Property SAXON_LINE_LENGTH
      Saxon extension: set to an integer (represented as a string) giving the desired maximum length of lines when indenting. Default is 80.
    • SAXON_ATTRIBUTE_ORDER

      public static final Serializer.Property SAXON_ATTRIBUTE_ORDER
      Saxon extension: set to a space-separated list of attribute names, in Clark or EQName notation, followed optionally by "*" and then another space-separated list of attribute names indicating that attributes present in the list should be serialized in the order indicated: specific attributes listed before the "*" come first in the order specified; then attributes not present in the list (these are sorted first by namespace, then by local name), and finally specific attributes listed after the "*", in the order specified.
    • SAXON_CANONICAL

      public static final Serializer.Property SAXON_CANONICAL
      Saxon extension: request canonical XML output. Value is "yes" or "no"
    • SAXON_NEWLINE

      public static final Serializer.Property SAXON_NEWLINE
      Saxon extension: set to any string. Indicates the sequence of characters used to represent a newline in the text output method, and in newlines used for indentation in any output methods that use indentation.
    • SAXON_SUPPRESS_INDENTATION

      public static final Serializer.Property SAXON_SUPPRESS_INDENTATION
      Set to a space-separated list of element names (in Clark or EQName notation), identifying elements (such as para) within which no content is to be indented. This is typically because the element contains mixed content in which whitespace is significant.

      This was originally a Saxon extension to the W3C specifications, but it then became a standard serialization attribute. The "SAXON_" prefix on the name of the enumeration constant reflects this history; the name is retained to avoid disrupting existing applications.

    • SAXON_DOUBLE_SPACE

      public static final Serializer.Property SAXON_DOUBLE_SPACE
      Saxon extension: set to a space-separated list of element names, in Clark or EQName notation, representing elements that will be preceded by an extra blank line in the output in addition to normal indentation.
    • SAXON_STYLESHEET_VERSION

      public static final Serializer.Property SAXON_STYLESHEET_VERSION
      Saxon extension for internal use: used in XSLT to tell the serializer whether the stylesheet used version="1.0" or version="2.0" (etc). Needed primarily because the algorithm for selecting a default output method is version-sensitive.
    • SAXON_CHARACTER_REPRESENTATION

      public static final Serializer.Property SAXON_CHARACTER_REPRESENTATION
      Saxon extension to indicate how characters outside the encoding should be represented, for example "hex" for hexadecimal character references, "decimal" for decimal character references
    • SAXON_RECOGNIZE_BINARY

      public static final Serializer.Property SAXON_RECOGNIZE_BINARY
      Saxon extension for use when writing to the text output method; this option causes the processing instructions hex and b64 to be recognized as containing hexBinary or base64 data respectively.
    • SAXON_REQUIRE_WELL_FORMED

      public static final Serializer.Property SAXON_REQUIRE_WELL_FORMED
      Saxon extension for use when output is sent to a SAX ContentHandler: indicates that the output is required to be well-formed (exactly one top-level element, no top-level text nodes)
    • SAXON_WRAP

      public static final Serializer.Property SAXON_WRAP
      Saxon extension, indicates that the output of a query is to be wrapped before serialization, such that each item in the result sequence is enclosed in an element indicating its type
    • SAXON_SUPPLY_SOURCE_LOCATOR

      public static final Serializer.Property SAXON_SUPPLY_SOURCE_LOCATOR
      Saxon extension for interfacing with debuggers; indicates that location information is available for events in this output stream
  • Method Details

    • values

      public static Serializer.Property[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Serializer.Property valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Get the name of the property expressed as a QName in Clark notation. The namespace will be null for standard serialization properties, and will be the Saxon namespace http://saxon.sf.net/ for Saxon extensions
      Overrides:
      toString in class Enum<Serializer.Property>
      Returns:
      the name of the serialization property as a QName in Clark notation, {uri}local
    • getQName

      public QName getQName()
      Get the name of the property expressed as a QName. The namespace will be null for standard serialization properties, and will be the Saxon namespace http://saxon.sf.net/ for Saxon extensions
      Returns:
      the name of the serialization property as a QName
    • get

      public static Serializer.Property get(String s)