W3C home > Mailing lists > Public > www-forms@w3.org > March 2007

Re: 1.0 errata section 10 (complex type validation clarification)

From: Steve K Speicher <sspeiche@us.ibm.com>
Date: Mon, 26 Mar 2007 18:42:25 -0400
To: www-forms@w3.org
Message-ID: <OFCF53E235.982CAC46-ON852572AA.00791766-852572AA.007C912B@us.ibm.com>

See thread http://lists.w3.org/Archives/Public/www-forms/2006Aug/0047.html
and resulting errata 
http://www.w3.org/2006/03/REC-xforms-20060314-errata.html#E10a

I find that the definition for validation in the errata is too strict and 
doesn't match that of some widely deployed usages of validated XML 
instances.

Take for instance this example:

  <!-- simple sample XForms model -->
  <xf:model schema="schema.xsd">
    <xf:instance src="stuff.xml" />
  </xf:model>

  <!-- stuff.xml -->
  <root xmlns="http://sample.com"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://sample.com schema.xsd">
    <child xsi:type="newType">
      <grandchild>Stuff</grandchild>
    </child>
  </root>

According to the errata it says: 
   "the node satisfies all applicable XML schema definitions (including 
those associated by the type model item property, by an external or an 
inline schema, or by xsi:type)"

If for example, my "newType" defines a conflicting complex content model 
for <child> then there is no way for my instance to validate, therefore it 
can never be submitted.  If you validate the instance using a standalone 
validator such as Xerces, it validates fine.

I believe the wording is intended to state that the node is valid if it 
passes validation for both these:
  1) external or inline schema, as possibly redefined by xsi:type
  2) type MIP

The errata wording seems to indicate that both external/inline schema and 
xsi:type schema type definitions should be used. 

Regards,
Steve Speicher
Received on Monday, 26 March 2007 22:40:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:09 GMT