List Info

Thread: XSchema and libxml




XSchema and libxml
user name
2006-05-26 19:12:44
Hi,

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

<note xmlns="http://www.w3schools.com
"
  xmlnssi=&
quot;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-bouncesgnome.org [mailtoml-bo
uncesgnome.org] On 
> Behalf Of Buchcik, Kasimier

> Hi (what's your first name? Hei or Chan?), 
> 
> > -----Original Message-----
> > From: Hei Chan [mailto:structurechartyahoo.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/msg0004
8.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.



_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )