Re: [xml] xml schema validation



Hi,

Christian HAESSIG wrote:
Hi Kasimier,

I have a question concerning the XML schema validation ; Daniel thinks you
can help me.

I have a xml file like this :

<?xml version="1.0" encoding="UTF-8"?>
<patient xmlns:xi="http://www.w3.org/2001/XInclude";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:noNamespaceSchemaLocation="xinclude.xsd">
    <studylist>
                <xi:include href="1.1.xml"></xi:include>
    </studylist>
</patient>

and I'm trying to validate this xml file using its schema file xinclude.xsd.
The question is : can I, using libxml2, get a  xmlSchemaValidCtxtPtr from
the xml file directly ( so, is libxml2 able to extract the schema file from
a xml file and build a xmlSchemaValidCtxtPtr object ? )
I was already thinking of parsing the xml file until I fall on the right
attribute, extract the schema file, and build the xmlSchemaValidCtxtPtr
object, but perhaps you have a better solution ?

[...]

The example for instance driven assembling of schemata can be found in:
http://mail.gnome.org/archives/xml/2005-March/msg00048.html

Regards,

Kasimier



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