code: @Nonnull
    public static String getDocTypeXMLRepresentation (@Nonnull final EXMLSerializeVersion eXMLVersion,
                                                      @Nonnull final EXMLIncorrectCharacterHandling eIncorrectCharHandling,
                                                      @Nonnull final String sQualifiedName,
                                                      @Nullable final String sPublicID,
                                                      @Nullable final String sSystemID)
    {
      // do not return a line break at the end! (JS variable assignment)
      final StringBuilder aSB = new StringBuilder (128);
      aSB.append ("<!DOCTYPE ").append (sQualifiedName);
      if (sPublicID != null && sSystemID != null)
      {
        // Public and system ID present
        aSB.append (" PUBLIC \"")
           .append (XMLMaskHelper.getMaskedXMLText (eXMLVersion,
                                                    EXMLCharMode.ATTRIBUTE_VALUE_DOUBLE_QUOTES,
                                                    eIncorrectCharHandling,
                                                    sPublicID))
           .append ("\" \"")
           .append (XMLMaskHelper.getMaskedXMLText (eXMLVersion,
                                                    EXMLCharMode.ATTRIBUTE_VALUE_DOUBLE_QUOTES,
                                                    eIncorrectCharHandling,
                                                    sSystemID))
           .append ('"');
      }
      else
        if (sSystemID != null)
        {
          // Only system ID present
          aSB.append (" SYSTEM \"")
             .append (XMLMaskHelper.getMaskedXMLText (eXMLVersion,
                                                      EXMLCharMode.ATTRIBUTE_VALUE_DOUBLE_QUOTES,
                                                      eIncorrectCharHandling,
                                                      sSystemID))
             .append ('"');
        }
      return aSB.append ('>').toString ();
    }
docs: Get the XML representation of a document type.
  
  @param eXMLVersion
  The XML version to use. May not be <code>null</code>.
  @param eIncorrectCharHandling
  The incorrect character handling. May not be <code>null</code>.
  @param sQualifiedName
  The qualified element name. May not be <code>null</code>.
  @param sPublicID
  The optional public ID. May be <code>null</code>. If the public ID is
  not <code>null</code> the system ID must also be set!
  @param sSystemID
  The optional system ID. May be <code>null</code>.
  @return The string DOCTYPE representation.