Enum Class XMLTextLineEndingStyle

java.lang.Object
java.lang.Enum<XMLTextLineEndingStyle>
org.apache.daffodil.api.infoset.XMLTextLineEndingStyle
All Implemented Interfaces:
Serializable, Comparable<XMLTextLineEndingStyle>, Constable

public enum XMLTextLineEndingStyle extends Enum<XMLTextLineEndingStyle>
XMLTextLineEndingStyles determine how carriage return (CR) and line feed (LF) characters in the text of xs:string elements are represented in an XML infoset.

Anything that consumes the infoset sees the represented form, not the original characters, and may need adjusting to account for the style.

  • Enum Constant Details

    • Standard

      public static final XMLTextLineEndingStyle Standard
      CRLF and a lone CR are converted to LF, as the XML specification requires of parsers. This is lossy, since the original line endings cannot be recovered. This is the default.
    • PUA

      public static final XMLTextLineEndingStyle PUA
      CR is remapped to the Unicode Private Use Area character U+E00D. LF is not changed, so CRLF is represented as U+E00D followed by LF. Line endings are preserved exactly, and an infoset inputter converts U+E00D back to CR. Patterns must account for CR being U+E00D.
  • Method Details

    • values

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

      public static XMLTextLineEndingStyle valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null