W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2002

validate against multiple schemas

From: Michael Ryan Bannon <mrbannon@uwaterloo.ca>
Date: Fri, 20 Sep 2002 10:30:30 -0400
Message-ID: <001e01c260b2$4592f7e0$445c6181@uwaterloo.ca>
To: <xmlschema-dev@w3.org>
Hi,

This question follows up from a question a posted some months ago.
I want to validate against multiple schemas.  Is this possible?
For example, I have the following XML file:

<?xml version="1.0"?>
<patientRecord xmlns:hosp="http://www.swen.uwaterloo.ca/~mrbannon/HOSPITAL"
    xmlns:proto=http://www.swen.uwaterloo.ca/~mrbannon/PROTOTYPE
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <hosp:name proto:dataItem="true">
   <hosp:surname>Bannon</hosp:surname>
   <hosp:givenNames>Michael Ryan</hosp:givenNames>
   <hosp:title>Mr.</hosp:title>
  </hosp:name>
</hosp:patientRecord>

What I want to happen is for a parser to validate all the "hospial" elements agains the "hospital" schema and the "proto" attribute against the "proto" schema.  Right now, the www.w3c.org schema online validator says that proto:dataItem is undeclared.  Is there a way around this?  Can I tell a validator to validate ONLY THOSE ELEMENTS AND ATTRIBUTES THAT ARE MARKED WITH "hosp" AGAINST THE "hospital" schema and likewise for the "prototype" schema?

Thanks,

Ryan
Received on Friday, 20 September 2002 10:27:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:34 GMT