#306 XML Entities Declared in Doctype Unrecognized

XML Parser (5)
Mark K

XML entities declared properly in the XML doctype are
not recognized by tidy.

<?xml version="1."?>
<!DOCTYPE poem [
<!ENTITY ext1 SYSTEM "lines938-939.xml">
<verse>I therefore, I alone first undertook</verse>
<verse>To wing the desolate Abyss, and spy</verse>
<verse>Better abode, and my afflicted Powers</verse>
<verse>To settle here on Earth or in mid-air</verse>

# tidy -xml -i tidytest.xml

line 25 column 13 - Warning: unescaped & or unknown
entity "&config"
1 warning, 0 errors were found!

And the resulting document ends up with &amp;ext1;
instead of &ext1; which would be the proper, legal

I used a pre-built binary for unix on today,


  • Björn Höhrmann

    • labels: 807377 --> XML Parser
  • Mark K

    Mark K - 2006-09-30

    Logged In: YES

    Opps, I copied the wrong error message.

    line 8 column 2 - Warning: unescaped & or unknown entity
    1 warning, 0 errors were found!

    The "&config" was from my original, more complicated XML
    document before I had this slimmed down test version.

  • Nobody/Anonymous

    Logged In: NO

    please add functionality to parse external DTDs.
    with xml-catalogs or something.

  • Geoff

    Geoff - 2016-09-20

    Thanks for the feature request... now so long ago... sorry for the delay...

    Tidy source has moved on to https://github.com/htacg/tidy-html5, site to http://www.html-tidy.org/

    Unfortunately, running tidy, version 5.3.11 still emits this warning on your sample...

    F:\Projects\tidy-test\test>tidy -xml input5\in_sf306.html
    line 8 column 1 - Warning: unescaped & or unknown entity "&ext1"
    Tidy found 1 warning and 0 errors!

    However, if you want to persue this, or find another tidy bug, or feature request, then please file an issue, together with tidy version, sample html input, config used, current output, and expected output, to make it easy to test the problem.

    And if you find, fix, and test the fix, or feature in a tidy fork then you can issue a Pull Request. Always appreciated... thanks...

    Tidy needs your support...

    Meantime closing this here as out-of-date...

  • Geoff

    Geoff - 2016-09-20
    • status: open --> closed-out-of-date
    • Group: --> Current - all platforms

Log in to post a comment.