You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Stanimir Stamenkov <st...@myrealbox.com> on 2005/10/06 10:42:18 UTC
Feature 'warn-on-undeclared-elemdef' not recognized
Using Xerces 2.7.1, trying to set the
'http://apache.org/xml/features/validation/warn-on-undeclared-elemdef'
feature on an 'XMLReader' instance obtained through the JAXP
interfaces causes an 'SAXNotRecognizedException' exception to be
thrown. Is this feature still supported? (I see it listed on the
"Features" page <http://xml.apache.org/xerces2-j/features.html>.)
Just to be sure, the 'SAXParserFactory' and 'XMLReader'
implementations are:
org.apache.xerces.jaxp.SAXParserFactoryImpl
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser
I've debugged a bit and found the 'fRecognizedFeatures' array field
of the XNI parser configuration of the 'XMLReader' implementation
indeed doesn't contain such identifier element.
--
Stanimir
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org
Re: Feature 'warn-on-undeclared-elemdef' not recognized
Posted by Stanimir Stamenkov <st...@myrealbox.com>.
/Michael Glavassevich/:
> This feature [1] has been busted for so long I sometimes wonder if it was
> ever implemented in any version of Xerces 2.x. I once looked back through
> the CVS history and couldn't find any evidence that it existed anywhere
> but Xerces 1.x. I've forgotten what file (or what version of that file) I
> saw it in.
Thank you for the clarification. I can see a constant for that
feature identifier defined in 'org.apache.xerces.impl.Constants'.
> If I can determine precisely what this feature actually used to
> do I'd be willing to take a stab at it if folks are interested.
>
> [1] http://issues.apache.org/jira/browse/XERCESJ-506
When an element declaration for an element being validated is
missing, an error is emitted:
<!DOCTYPE doc-root [
<!ELEMENT doc-root (elem-one,elem-two?)>
<!ELEMENT elem-one (#PCDATA)>
]>
<doc-root>
<elem-one> foo </elem-one>
<elem-two> bar </elem-two>
</doc-root>
I guess this feature should trigger warning for missing element
declarations (after the DTD has been loaded) for identifiers used in
content models, although validation for these identifiers might not
be necessary as in:
<!DOCTYPE doc-root [
<!ELEMENT doc-root (elem-one,elem-two?)>
<!ELEMENT elem-one (#PCDATA)>
]>
<doc-root>
<elem-one> foo </elem-one>
</doc-root>
--
Stanimir
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org
Re: Feature 'warn-on-undeclared-elemdef' not recognized
Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Stanimir,
This feature [1] has been busted for so long I sometimes wonder if it was
ever implemented in any version of Xerces 2.x. I once looked back through
the CVS history and couldn't find any evidence that it existed anywhere
but Xerces 1.x. I've forgotten what file (or what version of that file) I
saw it in. If I can determine precisely what this feature actually used to
do I'd be willing to take a stab at it if folks are interested.
Thanks.
[1] http://issues.apache.org/jira/browse/XERCESJ-506
Stanimir Stamenkov <st...@myrealbox.com> wrote on 10/06/2005 04:42:18 AM:
> Using Xerces 2.7.1, trying to set the
> 'http://apache.org/xml/features/validation/warn-on-undeclared-elemdef'
> feature on an 'XMLReader' instance obtained through the JAXP
> interfaces causes an 'SAXNotRecognizedException' exception to be
> thrown. Is this feature still supported? (I see it listed on the
> "Features" page <http://xml.apache.org/xerces2-j/features.html>.)
>
> Just to be sure, the 'SAXParserFactory' and 'XMLReader'
> implementations are:
>
> org.apache.xerces.jaxp.SAXParserFactoryImpl
> org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser
>
> I've debugged a bit and found the 'fRecognizedFeatures' array field
> of the XNI parser configuration of the 'XMLReader' implementation
> indeed doesn't contain such identifier element.
>
> --
> Stanimir
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
>
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org