-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
1.2.0, 1.4.1
-
generic
-
generic
Name: dkR10031 Date: 07/29/2002
The description of the method org.xml.sax.ext.DeclHandler.attributeDecl()
contradicts the XML 1.0 (Second Edition) specification. The method description reads:
"Any parameter entities in the attribute value will be expanded,
but general entities will not."
However, the Extensible Markup Language (XML) 1.0 (Second Edition) reads:
"
Attribute-list Declaration:
[52] AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>'
[53] AttDef ::= S Name S AttType S DefaultDecl "
[60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
[10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"
[67] Reference ::= EntityRef | CharRef
[68] EntityRef ::= '&' Name ';' ".
So a parameter entity reference should not be recognized in an attribute value.
Only general entity references are recognized. The specification also
reads that an internal general entity reference in Attribute Value is included
in literal (table in section 4.4).
So parameter entity references should not be expanded in the attribute value, but
general entity references should.
This issue is found in jdk1.4.0-b92, jaxp-1.2.0-fcs-b21 and affects the
api/org_xml/sax/ext/DeclHandler/index.html#Decl[Decl114].
Note, the SAX 2.0.1 API documentation does not contain this
contradiction.
======================================================================