Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-43029

Documentation for XMLStreamReader/Writer does not mention inability to handle XML 1.1

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.3.2, 5.5.1
    • None

    Description

      The current (5.3 to present 5.5.1) documentation for the writer is misleading about the fact that it DOES NOT support XML 1.1, the documentation for the class does not mention it and the methods that put the information in the file merely say:

      QXmlStreamWriter::writeProcessingInstruction(const QString & target, const QString & data = QString()) which says: "Writes a document start with the XML version number version."
      QXmlStreamWriter::writeStartDocument(const QString & version, bool standalone) which says: "Writes a document start with the XML version number version."
      QXmlStreamWriter::writeStartDocument() which say: "Writes a document start with XML version number "1.0". This also writes the encoding information."

      This is confusing because it suggests that by using a string of the form "1.1" as "version" in the second case and "target" in the first then 1.1 WILL be used.

      In the reader if the parsed tokenType() is the StartDocument one then QXmlStreamReader::documentVersion() is supposed to return the above set text, whether it does if the text is NOT "1.0" I have yet to determine... I need to do further work to determine how the parser behaves but I suspect it aborts as soon as it sees "1.1" though that IS just speculation on my part at this point.

      My reason for raising this issue is that I have a situation where I think I need 1.1 support

      {to handle ASCII C0 control characters (other than TAB, LF and CR) which are prohibited by XML 1.0 but permitted as numeric entities in 1.1 }

      I will link the separate bug report for that when created.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              thiago Thiago Macieira
              slysven Stephen Lyons
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes