[oXygen-user] Duplicate entity declarations are warnings, not errors.

George Cristian Bina
Thu Sep 29 02:21:23 CDT 2005

Hi Chris,

Hmm... we will need some samples to reproduce that. At a quick test 
oXygen reports an *warning* when a DTD with a duplicate entity is 
validated and *nothing* when a valid XML document is validated against 
that DTD.

<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT test (#PCDATA) >
<!ENTITY a 'A' >
<!ENTITY a 'A' >

SystemID: E:\workspace\oXygen\samples\test.dtd
Location: 4:1
Description: W Entity "a" is declared more than once.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE test SYSTEM "test.dtd">

No errors.

Best Regards,
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger

Chris Lilley wrote:
> Hello oXygen-user,
> I am concerned about an aspect of DTD validation in oXygen. Duplicate
> entity declarations are flagged as errors, and validation halts.
> from the XML spec,    4.2 Entity Declarations
> http://www.w3.org/TR/REC-xml/#sec-entity-decl
>>> If the same entity is declared more than once, the first declaration
>>> encountered is binding; at user option, an XML processor MAY issue a
>>> warning if entities are declared multiple times.
> Unless I missed a configuration option, the message is not at user
> option but is always on. Further, its given as an error rather than a
> warning.
> The obvious workaround to delete the dupes :-) may not apply if the DTD
> is read-only and on someone else's website. Besides, they might decline
> to fix it on the grounds that per the XML spec, its harmless and should
> not generate an error.
> Please at minimum make this a warning, not an error; ideally, make
> reporting of the warning configurable.

More information about the oXygen-user mailing list