David,

At 11.21 29/05/2002 +0200, you wrote:
>Thanks Alberto.
>
>As far as I know, the namespace "http://www.w3.org/2001/XMLSchema"; is 
>built inside the parser. I have never had to specify the location of that 
>schema before when I was validating documents (my email document was 
>validated against my email schema, and that was all).
>
>Why do I have to specify the location now? I was expecting my email schema 
>to be validated against the build in schema the same way than in the 
>preceding case...

I guess that the XML document you were validating was using the 
xsi:noNamespaceSchemaLocation="email.xsd" attribute to specify where the 
schema file was. And now you are using email.xsd as a normal XML file, so 
you need to tell the parser where its schema is.


>And one more question: in case that I really do have to specify that 
>schema location, would it be possible to do it in schema syntax rather 
>than in the DTD syntax that you proposed? I am not using DTDs at all and I 
>think that it is better not to mix both syntaxs. I think that schemas are 
>good enough not to have to depend on DTDs, aren't they? :-)

The problem is, last time I tried to use the XMLSchema.xsd schema to 
validate an XML Schema file, I got a ton of errors (bug 7417, 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7417 ): for instance 
XMLSchema.xsd defines xsd:anySimpleType, but Xerces doesn't allow its 
(re)definition.

The other solution (that I use when I need to validate an XML Schema), is 
to use the "parser that is built in", as you say. You just need a valid 
email.xml file that points to email.xsd; if validation fails, there is an 
error inside the XML Schema.

Hope this helps,

Alberto


-------------------------------
Alberto Massari
eXcelon Corp.
http://www.StylusStudio.com


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

Reply via email to