[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] XSD validation example needed
- From: Daniel Veillard <veillard redhat com>
- To: Samuel Díaz García <samueldg arcoscom com>
- Cc: xml gnome org
- Subject: Re: [xml] XSD validation example needed
- Date: Tue, 25 Jan 2005 11:16:11 -0500
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/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]