www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4598] New: std.xml check is too restrictive

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4598

           Summary: std.xml check is too restrictive
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: kroeplin.d googlemail.com



07:28:17 PDT ---
The check function of std.xml requires each XML document to begin with an XML
declaration <?xml ...
According to the specification
http://www.w3.org/TR/2008/REC-xml-20081126/#NT-prolog, however, the XML
declaration is optional!
The check function should not throw for well-formed XML documents like
    <Root/>

The following trivial change fixes the issue:
in function checkProlog replace
    checkXMLDecl(s);
with
    opt!(checkXMLDecl)(s);
(at line 2249 inD 2.047)

Then, the by-the-book implementation conforms to the XML specification.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 08 2010
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4598


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED



00:50:52 PST ---
https://github.com/D-Programming-Language/phobos/commit/043125d4c7edc216aa47daad1bb94ae6ff4220b1

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 07 2011