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?

Thx,
Elena
 

-------- Original Message --------
Subject: Xerces2: JAXP impl different than DOMParser?
Date: Fri, 18 Jan 2002 18:58:55 -0500
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to