Elliotte Rusty Harold elharo at metalab.unc.edu
Thu Apr 18 08:12:25 PDT 2002

The Attribute class defines integer constants for the various attribute 
types including a default of UNDECLARED_ATTRIBUTE

    protected int type = UNDECLARED_ATTRIBUTE;

In my opinion, this is incorrect according to the XML 1.0 specification, 
http://www.w3.org/TR/REC-xml#sec-attribute-types , "All attributes for 
which no declaration has been read should be treated by a non-validating 
processor as if declared *CDATA*." (The restriction to non-validating 
processors here is IMO an erratum in the spec which I just reported to 
the editors.) I think we should delete the UNDECLARED_ATTRIBUTE field 
and use CDATA as the default attribute type.

On a related note, should we perhaps be using the type-safe enum pattenr 
here instead of int constants?

| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
|           The XML Bible, 2nd Edition (IDG Books, 2001)             |
|             http://www.cafeconleche.org/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
|  Read Cafe au Lait for Java News:   http://www.cafeaulait.org/     | 
|  Read Cafe con Leche for XML News:  http://www.cafeconleche.org/   |

More information about the jdom-interest mailing list