W3C home > Mailing lists > Public > www-forms@w3.org > February 2006

Re: xml schema validation

From: David Landwehr <david.landwehr@solidapp.com>
Date: Mon, 27 Feb 2006 08:01:41 +0100
Message-ID: <4402A3D5.90801@solidapp.com>
To: Jay Knight <jhknight@gmail.com>
Cc: www-forms@w3.org

Hi Jay,

You can have schema elements in the content model of the xforms model. 
When it is defined there it is regarded as an internal schema and 
automatic included for validation. E.g. you can have
<xforms:model id="m1" schema="#os schema2.xsd">

<xforms:model id="m2">
  <xsd:schema id="os">

In this example the schema in m2 is automatically included for the 
instances in m2. In m1 the schema schema2.xsd is loaded and associated 
for instances in m1, also the reference to the schema in m2 means that 
that one is included there as well. Your example fragment looked correct 
to me.

I guess when several schemas are listed then they apply depending on the 
top level element definitions from the schemas. E.g. the schema that has 
a top level name that match the document element in an instance will 
start applying that schema. I'm not sure how and where this is defined 
in the XForms specification...

If the php function only will look at a single schema you have to 
construct a special schema which includes all the schemas you want to use.

When you start using xsd:bind/@type you use functionality which is not 
defined in XML Schema but in XForms and hence you cannot get an easy 
solution for validating your instances. In that case you might need to 
revalidate on the server using the constraints from the XForms model and 
I'm not sure there is an PHP function for doing just that.

Best regards,

David Landwehr (david.landwehr@solidapp.com)
Chief Executive Officer, SolidApp
Web: http://www.solidapp.com
Office: +45 48268212
Mobile: +45 24275518
Received on Monday, 27 February 2006 07:01:38 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:16 UTC