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

xml schema validation

From: Jay Knight <jhknight@gmail.com>
Date: Fri, 24 Feb 2006 11:00:13 -0600
Message-ID: <f95b617c0602240900s2b48f21fuf53bc34021a7c176@mail.gmail.com>
To: www-forms@w3.org

I have some questions about XML schema validation... can't seem to
find any good examples of this sort of stuff.

>From http://www.w3.org/TR/xforms/slice3.html#structure-model:

schema attribute on model element: Optional list of xsd:anyURI links
to XML Schema documents outside this model element. The XForms
Processor must process all Schemas listed in this attribute. Within
each XForms Model, there is a limit of one Schema per namespace
declaration, including inline and linked Schemas.

So, where all can schemas be defined?  What are inline schemas?  I
think I've seen this in more recent drafts, but not in the 1.0 rec. 
Is the following fragment legal?

<model schema="schema_1.xsd">
<instance>
<data>
<value/>
</data>
</instance>
<bind nodeset="value" type="something" />
<!-- Where "something" is defined in schema_1.xsd -->
</model>

Also, if there are multiple schemas listed, how are they treated?  The
same as if they were both in the same file?  I'm trying to use php's
schema validation function
(http://us2.php.net/manual/en/function.dom-domdocument-schemavalidate.php)
to validate, but it will only look at one file.  So how should I
handle that?  And what if I have one schema, but I add a <bind
type="xs:integer"/>, how should I validate both?

Am I way off base on all this?

Jay K
Received on Friday, 24 February 2006 17:00:21 GMT

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