Hi Neil !

> [..]

> All right, I'm convinced.  Change made in CVS.

Thanx.

*hmm* had a look at the fix.
That was done a little bit different than what I suggested, but that 
doesn�t matter much.

parser.setEntityResolver( (fEntityResolver != null)? 
(fEntityResolver):(new Resolver()) );

What I suggested was that it could be similar to what is done in 
org/apache/xerces/validators/common/XMLValidator.java

parser.setEntityResolver(new Resolver(fEntityHandler));

The corresponding Resolver there also seemed to be suitable to me.

Bye the way: after you�ve removed the DTD�s from the source the inner 
Resolver class doesn�t really do anything useful anymore. As what it did 
was providing those DTD�s.


> ! for 5.) No i don�t think they should be removed, they shoud be updated 
to
> the
> ! ones included in my testcase ;-) As this would enable the Schema
> validator to
> ! be able to handle schema documents that use a DOCTYPE declaration to
> declare
> ! that they are schema documents, see above.

> ???  Basically, if Xerces sees a schemaLocation in an instance document 
and
> it resolves to an XML document, it will take that to be a schema and 
squeal
> if it isn't.  We don't need (and I don't believe should have to have) a
> DOCTYPE definition to tell us anything...

Agreed to some extend. The parser would in most cases not need the 
DOCTYPE definition for anything. But an application could have other use 
of the XMLSchema than using it for validating a document. Eg. generating 
stubs for WebServices or similar. Parsing the Schema for some other need 
one can take advantage of the public identifier, eg. in an 
EntityResolver. And just for readability it is nice to have a DOCTYPE 
declaration.

So we don�t need it in the parser, but we should be able to handle it if 
it has one. With the fix you�ve supplied it is possible for a developer 
using the parser to customize the parser to be able to do that, so that�s 
probably enough. Then XMLSchema schemas are examples that do use a 
DOCTYPE declaration.

A more sophisticated example would be an Schema declaring entites in the 
DOCTYPE declaration and referening to external entites doing something 
similar to XHTML modularisation with a schema, but chances that someone 
would want to do such wierd thing are pretty low of course.

> [..]

> The schema for schemas is one of the parts of the Schema specifications
> that we consulted when we developed the schema implementation.  It isn't
> sufficient to validate schema documents on its own, but using it to help
> validate documents must be slower than building a custom engine for
> validating schema docs.  That's why we've gone down the road of building
> the capability to validate schemas right into the parser, not relying on
> any DTD's or schemas to help; it just speeds things up.

OK, understood that approach. 

But once something like a "XML Schema CM API" will have been published, 
thinks will likely get more complicated. Will be interesting to see how 
this will be done in Xerces-2.

> So that's why the files in question are now gone from CVS: we weren't 
using them and they were confusing people.
Aehm, you were using them with the older version of the Schema 
specification.  They were used to speed up parsing every time a DOCTYPE 
declartion was present in a schema referring to 
http://www.w3.org/TR/2000/WD-xmlschema-1-20000407/structures.dtd"; 
That�s what the Resolver set at the DOMParser did.
Without them the default Resolver of the parser goes online and load them 
from the w3c site. With the fix one can prevent this by suppling an on 
EntityResolver in this case. But IMHO it but have been nice to do this 
also if the user of the parser was not prepared to do so. An upgrade to 
recent version would than have used them whenever a DOCTYPE declaration 
for the current schema specification was present.  
> As to schemas we can't validate:  you're right, we certainly have 
problems
> with xml.xsd.  I think that's because we don't understand that "xml" is
> implccitly bound to a particular namespace; I still have to look up 
whether
> this is indeed expected of us.  (Anyone know offhand?)  If it is then 
we'd
> better change that behaviour...

Well I doubt that any schema that wants to use either

     <xs:attribute ref="xml:lang"/>

or

    <xs:attribute ref="xml:space"/>  

would be possible otherwise.

Schemas are also XML documents that are defined by a Schema, the 
XMLSchema.xsd 
As a developer you would like to be able to check wether you made some 
mistake by using a Schema validator. Yes I know there is a workaround.

> If you have other schemas that don't validate, we'd love to have access 
to
> them, especially if you can whittle them down to show precisely where 
we're
> going off the rails.  That's how we'll become better at validating 
schemas.
> :-)

If time permits, I�d love to :-(

> [..]

> Yup.  :-)

> Hope that helps,
> Neil

Kind regards,
Bernd



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

Reply via email to