RE: [xml] XSchema and libxml



Hi,

I realized that the problem was actually in the instance
document of your example:

<note xmlns="http://www.w3schools.com";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://localhost/test.xsd";>

If xsi:schemaLocation is used then the value must consist of
(namespace name, document URI) tuples.
Thus is should be:
xsi:schemaLocation="http://www.w3schools.com http://localhost/test.xsd";

However, we'll let the processor better report the following:

1) A warning if the value is malformed
  (Xerces reports a warning here; Saxon does not report it)
2) A warning if the document could not be located
  (Note that this is still no error, since the location
  is just a "hint" for the processor; i.e., the information is
  just ignored if no schema document is found)

Regards,

Kasimier

-----Original Message-----
From: xml-bounces gnome org [mailto:xml-bounces gnome org] On 
Behalf Of Buchcik, Kasimier

Hi (what's your first name? Hei or Chan?), 

-----Original Message-----
From: Hei Chan [mailto:structurechart yahoo com] 

Hi Kasimier,

Thanks for your quick reply.
I didn't mention clearly that I used the same piece of
C code you provided in
http://mail.gnome.org/archives/xml/2005-March/msg00048.html
to validate my XML.

I was not using xmllint.

I take a look at the bug (you listed):
http://bugzilla.gnome.org/show_bug.cgi?id=157205

It seems to me that xmlSchemaValidateDoc won't work
with xmlSchemaNewValidCtxtPtr(which has a NULL URL).

Is it true?

Thanks for your time.

Ah. Well, it used to work, but since we don't have regression tests
for this, we might have broken it in the meantime without noticing.
I'll try to look into this today and will keep you informed.






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]