Hi,
> -----Original Message-----
> From: xml-bounces gnome.org [mailto ml-bo
unces gnome.org] On
> Behalf Of Andreas Tscharner
> Hello World,
>
> I have three schemata: A.xsd, B.xsd and C.xsd. A.xsd is
the "master"
> schema: it imports B.xsd; B.xsd on the other hand
imports C.xsd.
> If I load A.xsd from the filesystem with
xmlSchemaNewParserCtxt, the
> validation against my test file works and is
successful.
>
> Now my problem: A.xsd, B.xsd and C.xsd are all in
memory in different
> places. I am able to "load" A.xsd using
xmlSchemaNewMemParserCtxt, but
> as
> it does not know about B.xsd and C.xsd I got the error
code 1845:
> XML_SCHEMAV_CVC_ELT_1.
The error message would be even more interesting.
> How can I validate my document with these three files
in memory?
>
> TIA and best regards
> Andreas
Subsequent XML Schema documents are located using the schemaLocation
of an import/include in Libxml2. You could modify Libxml2's
IO layer
and use a propriatery URI scheme to redirect the acquisition
of the
schema document to your in-memory string. So similar to the
xml-catalog mechanism. I currently think that we don't need
an extra
input mechanism for the XML Schema module.
The spec does not mention a specific mechanism for this
scenario:
(from http://w
ww.w3.org/TR/xmlschema-1/#schema-loc)
"Note: As discussed above in Layer 2: Schema
Documents, Namespaces
and Composition (§4.2), other non-Web mechanisms for
delivering
schemas for ·assessment· may exist, but are outside the
scope of this
specification."
Regards,
Kasimier
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
|