Re: [xml] Multiple schemata in memory
- From: "Buchcik, Kasimier" <k buchcik 4commerce de>
- To: "Andreas Tscharner" <andreas tscharner metromec ch>
- Cc: xml gnome org
- Subject: Re: [xml] Multiple schemata in memory
- Date: Thu, 22 Jun 2006 15:35:32 +0200
Hi,
-----Original Message-----
From: xml-bounces gnome org [mailto:xml-bounces 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://www.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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]