Bug 42842

Summary: Create a PUBLIC identifier for the log4j DTD
Product: Log4j Reporter: Paul Benedict <paul4christ79>
Component: OtherAssignee: log4j-dev <log4j-dev>
Status: RESOLVED FIXED    
Severity: normal CC: robmoore
Priority: P2    
Version: 1.2   
Target Milestone: ---   
Hardware: Other   
OS: other   

Description Paul Benedict 2007-07-09 10:47:09 UTC
With a SYSTEM identifier, the DTD cannot be used for IDE auto-completion unless
the file is physically sitting in the webapp root. If a PUBLIC identifier was
given, then IDEs could retrieve the DTD from the jar library through the
classpath. I am using XML for configuration.

Proposal:
<!DOCTYPE log4j PUBLIC "-//LOG4J//DTD LOG4J//EN"
"http://logging.apache.org/dtd/log4j-1.2.dtd">

Notice I added a "-1.2" suffix to the filename to indicate the DTD belongs to
the 1.2.x branch. This will help moving to 1.3 when a 1.3 DTD becomes available.
Also, because the filename is different, this shouldn't affect any current users
when packaging both the historical SYSTEM and new PUBLIC versions in one libary.
Comment 1 Paul Smith 2008-09-09 22:17:50 UTC
woops, I hate bugzilla moving on to the next in the list. 
Comment 2 Curt Arnold 2009-08-04 19:43:07 UTC
There is no code in log4j that outputs a XML declaration.  There was only one place that could consume (the entity resolver that previously assumed that any system identifier ending with 'log4j.dtd' was our DTD.  I modified it to also recognize '-//APACHE//DTD LOG4J 1.2//EN" as identifying the current log4j.dtd.  Should have no negative effect on any other public identifiers users have used to identify the log4j.dtd.

Committed 801049.