Menu

#15 "Internal DTD" support for TinyXML

open
nobody
None
5
2005-02-07
2005-02-07
No

As is described in tracker report #988109, there is no
support for internal DTDs, yet. Internal DTDs are those
which do not refer to external DTD files, but instead give
the content of such a DTD directly inside the DTD tag.

However, due to the special nature of this tag - it
contains other tags - TinyXML gets confused.

I patched this problem in a very pragmatic manner and
this code should not break backwards-code-compatibility.
What I did was to introduce a new node-type. The
Unknown class can now have either UNKNOWN or DTD as
its type. These types are treated slightly different in the
parsing routines in a way which will have no impact on
existing code. Maybe the developers will want to derive
the Unknown class instead, but I thought it was
sufficient to adjust its behavior.

The attached files contain the already patched version of
the two changed files and DIFF files as an alternative.
Choose your way ;)

ALL CHANGES are relative to 2.3.3, but have been tested
in 2.3.2 as well - however, the DIFF cannot be applied to
2.3.2.

Oliver

PS: Did not verify on any compiler except vc++6! But the
changes are not that significant, I think platform
independence should not be touched by this.

Discussion

  • Oliver Schneider

    Contains 2 ZIP files: one with DIFF files, the other with patched files.

     
  • Sebastian Schuberth

    Logged In: YES
    user_id=787298

    Works great here using VC++ 7.1 (.NET 2003). Thanks!

     
  • Pixel

    Pixel - 2006-03-24

    Logged In: YES
    user_id=480929

    I tried this patch on version 2.3.3 but the following line:

    <!DOCTYPE WMT_MS_Capabilities SYSTEM
    "http://www.digitalearth.gov/wmt/xml/capabilities_1_1_1.dtd"
    [ <!ELEMENT VendorSpecificCapabilities EMPTY> ]>

    still lost the parser :(

     
  • Oliver Schneider

    Logged In: YES
    user_id=216947

    pix3l, this is due to the fact that you use a combination
    of external and internal DTD.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.