code: @Nonnull
    @ReturnsMutableCopy
    public static XMLWriterSettings createForCanonicalization ()
    {
      // TODO some Canonicalization settings are missing
      return new XMLWriterSettings ().setSerializeVersion (EXMLSerializeVersion.XML_10)
                                     .setSerializeXMLDeclaration (EXMLSerializeXMLDeclaration.IGNORE)
                                     .setSerializeDocType (EXMLSerializeDocType.IGNORE)
                                     .setCharset (StandardCharsets.UTF_8)
                                     .setNewLineMode (ENewLineMode.UNIX)
                                     .setUseDoubleQuotesForAttributes (true)
                                     .setBracketModeDeterminator (new XMLBracketModeDeterminatorXMLC14 ())
                                     .setWriteCDATAAsText (true)
                                     .setOrderAttributesAndNamespaces (true);
    }
docs: The canonical form of an XML document is physical representation of the
  document produced by the method described in this specification. The
  changes are summarized in the following list:
  <ul>
  <li>The document is encoded in UTF-8</li>
  <li>Line breaks normalized to #xA on input, before parsing</li>
  <li>Attribute values are normalized, as if by a validating processor</li>
  <li>Character and parsed entity references are replaced</li>
  <li>CDATA sections are replaced with their character content</li>
  <li>The XML declaration and document type declaration are removed</li>
  <li>Empty elements are converted to start-end tag pairs</li>
  <li>Whitespace outside of the document element and within start and end
  tags is normalized</li>
  <li>All whitespace in character content is retained (excluding characters
  removed during line feed normalization)</li>
  <li>Attribute value delimiters are set to quotation marks (double
  quotes)</li>
  <li>Special characters in attribute values and character content are
  replaced by character references</li>
  <li>Superfluous namespace declarations are removed from each element</li>
  <li>Default attributes are added to each element</li>
  <li>Fixup of xml:base attributes [C14N-Issues] is performed</li>
  <li>Lexicographic order is imposed on the namespace declarations and
  attributes of each element</li>
  </ul>
  
  @return {@link XMLWriterSettings} for canonicalization