This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 118811 - (o.n.e.ext.html.dtd) DTDParser doesn't work for W3C DTDs
Summary: (o.n.e.ext.html.dtd) DTDParser doesn't work for W3C DTDs
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@web
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-13 20:41 UTC by emi
Modified: 2009-05-18 10:45 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description emi 2007-10-13 20:41:49 UTC
I noticed I get an exception while trying to use the W3C XHTML Strict DTDs with DTDParser while parsing the ENTITY
declaration.

It took me a while to see that the W3C .ent (eg. http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent) file has something like

LT !ENTITY nbsp   " " GT

while the "default" DTDs you register in the layer have

LT !ENTITY nbsp   CDATA " " -- some comment -- GT

This looks like a bug in the parser to me as it probably also restricts the usage of other DTDs that are not
hand-tailored to match the CDATA convention.

At least some warning message or verbose exception would be nice in this case as it took me a while to see that the
official W3C DTDs were "wrong" and debugging the parse is no picnic.


(using LT and GT as I don't know how the bugtracker handles HTML brackets).
Comment 1 Petr Jiricka 2007-10-30 17:16:10 UTC
Hi, thanks for the report, but I must say I don't understand what exactly is the problem. What exactly are you trying to
do in the IDE? Do you have any steps to reproduce this issue? Thanks.
Comment 2 emi 2007-10-30 18:13:11 UTC
I try to use the DTDParser and parse the official DTDs from W3C, which fail. It seems in the official release the w3c DTDs have been (hand-)modified to please 
the parser.

I'm basically trying to use the HTML Editor in a standalone application and I register my own DTDs. It seems the DTDParser has some issues with custom DTDs 
(at least the onese from W3C).
Comment 3 Marek Fukala 2009-05-18 10:21:37 UTC
Already fixed. The DTD Parser in fact parses SGML DTDs (HTML3-4.1). Recently I fixed html support for xhtml so improved
it slightly, it can parse XML DTDs now.