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 Edwin Goei <ed...@sun.com> on 2002/01/22 23:44:44 UTC
Re: [Fwd: Xerces2: JAXP impl different than DOMParser?]
Elena Litani wrote:
>
> Edwin,
>
> DocumentBuilderFactoryImpl should not set by default (in the
> constructor) schemaLanguage property, because it will break existing
> applications (see forwarded email).
>
> Can you fix it?
It is a bug in Xerces2beta4 which I will fix.
-Edwin
>
> Thx,
> Elena
>
>
> -------- Original Message --------
> Subject: Xerces2: JAXP impl different than DOMParser?
> Date: Fri, 18 Jan 2002 18:58:55 -0500
> From: Eric_Schwarzenbach@Classwell.com
> Reply-To: xerces-j-user@xml.apache.org
> To: xerces-j-user@xml.apache.org
>
> If I parse an xml document referencing a schema, but having no DOCTYPE
> declaration, using a parser created using the JAXP factories, I get the
> following error (via my installed ErrorHandler):
>
> Document root element "resource", must match DOCTYPE root "null".
>
> However if I create an instance of org.apache.xerces.parsers.DOMParser
> and
> parse with that, I get no such error.
>
> In both cases I use the same ErrorHandler. In both cases I enable the
> same
> features.
>
> In the JAXP case:
>
> factory.setValidating(true);
> factory.setNamespaceAware(true);
> factory.setAttribute
> ("http://apache.org/xml/features/validation/schema", new Boolean(true));
> factory.setAttribute
> ("http://apache.org/xml/features/validation/schema-full-checking", new
> Boolean(true));
> factory.setIgnoringElementContentWhitespace(true);
>
> In the DOMParser case:
>
> domParser.setFeature("http://xml.org/sax/features/validation",
> true);
> domParser.setFeature
> ("http://apache.org/xml/features/validation/schema", true);
> domParser.setFeature
> ("http://apache.org/xml/features/validation/schema-full-checking",
> true);
> domParser.setFeature("http://xml.org/sax/features/namespaces",
> true);
> domParser.setFeature
> ("http://apache.org/xml/features/dom/include-ignorable-whitespace",
> false);
>
> Is there some difference I am missing? Or do the two methods of
> instantiation really use different parser implementations?
> Is this a bug?
>
> This is Xerces2 beta4.
>
> Thanks,
>
> Eric
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org