You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Gregor Karlinger <gr...@iaik.at> on 2000/11/03 08:57:28 UTC
Q/Bug: Meaning of general feature "http://apache.org/xml/features/nonvalidating/load-dtd-grammar"
Hi all,
In the features document shipping with Xerces J 1.2.1 the
explanatory text for feature
"http://apache.org/xml/features/nonvalidating/load-dtd-grammar"
says for "true":
"Will load the DTD Grammar, based on the information provided
in DTD, add default attribute information and SET THE ATTRIBUTE
TYPE when parsing."
I am especially interested in the meaning of the phrase "set the
attribute type". Consider the following sample XML document:
<!DOCTYPE doc [<!ATTLIST doc idAttr ID #IMPLIED>]>
<doc idAttr=" SpacesAroundThisValue "/>
If the DTD grammar is loaded, the parser should be able to
regcognize that the attribute "idAttr" is of type ID, and therefore
it should normalize the value to "SpacesAroundThisValue", i. e.
the leading and trailing spaces should be removed according to
the XML 1.0 (second edition) specification (see
http://www.w3.org/TR/REC-xml#AVNormalize).
BTW, the mentioned feature is not recognized by the method
DOMParser.getFeature, although it is listed in the recognized
features, and although it can be set by method DOMParser.setFeature.
Regards, Gregor
---------------------------------------------------------------
Gregor Karlinger
mailto:gregor.karlinger@gmx.net
http://GregorKarlinger.tsx.org
Student of Telematics
Graz, Austria
---------------------------------------------------------------