On Tue, Jan 25, 2005 at 04:08:42PM +0100, Samuel D�az Garc�a wrote:
> Well, I found the testschema.c file, thanks, but ...
> ... if my ROOT element has an schema asigned using this directive into 
> the XML file?
> <MYROOT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> xsi:noNamespaceSchemaLocation="<xsd-uri>">
> How can I validate it?

  If you trust the XML File content, why do you validate it ?
  If you don't trust the XML File content, how can you trust that
specific attribute value ?
  A Schemas/DTD is a contract between a provider and consumer,
I would never blindly trust a contract coming with the product, that's
why I don't believe in the whole xsi (instance schemas informations).

 Kasimier added support for it in September last year. I think you
create a schemas validation context with a NULL argument to
xmlSchemaNewValidCtxt() and try to validate the xmlDocPtr with that.

> Taking the attrib value first, downloading and validate?

 That's one way too, yes.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to