W3C home > Mailing lists > Public > www-forms@w3.org > August 2002

RE: [XForms] xforms:schema missing

From: Klotz, Leigh <Leigh.Klotz@pahv.xerox.com>
Date: Wed, 28 Aug 2002 11:01:56 -0700
Message-ID: <51B8ABCE456FD111899900805F6FD6EE0FF57A14@mercury.ADOC.xerox.com>
To: "'Roman Huditsch'" <roman.huditsch@hico.com>, "'www-forms@w3.org'" <www-forms@w3.org>

Roman,

Both The <xsd:schema> child element of model and the xforms:schema attribute
on model are present in the latest draft.  
Is there something misleading in the spec?  If so, please let us know where.

Please see http://www.w3.org/TR/xforms/sliceA.html and note that any number
of <xsd:schema> elements are allowed as children of <xforms:model>, and the
model schema attribute specifies a space-separated list of URIs of schema
locations.   The XML Schemas provided by these two sources are the normative
Schemas for to all instances in the model

Below is an FAQ on the Schema location issue:

* Why did we not use xsi:schemaLocation and xsi:noNamespaceSchemaLocation
attributes on the instance element or the instance data itself?
For two reasons:
- The XML Schema 1.0 xsi:schemaLocation and xsi:noNamespaceSchemaLocation
attributes within XForms instance are ignored, because XML Schema says that
they might be ignored, and because they come from the data itself, which
cannot be trusted and which might not be able to the declarations anyway.  

- Schema validation might take place outside of XForms, and declarations of
xsi:schemaLocation and xsi:noNamespaceSchemaLocation would likely be
erroneous in these conditions, because only the submitted instance data is
destined to be Schema valid.  For example, during server-side construction
of the document to be sent to the XForms processor, if an instance contained
an xsi:schemaLocation, it would probably not by valid according to that
Schema, because it might be lacking valid content or attribute values, might
have additional content which is to be excised later with <bind
nodeset="..." relevant="..."/>, etc.

* Why did we introduce the model schema attribute?  
We examined using only <xsd:schema> element and allowing the inclusion of
multiple Schemas with <xsd:import>, but XML Schema says the xsd:import
schemaLocation attribute may be ignored by an XML Schema processor, so we
chose to provide a declaration in XForms that is not ignored.  (See
implementation considerations, below.)

* Why did we use a space-separated list of URIs for the model schema
attribute?
We copied the idea from the similar xsd:schemaLocation, which uses a
space-separated list of URIs.

* Yes, but why did we make the model schema attribute be a list of Schema
locations only and not of alternatinv namespace URIs and Schema location
URIs?
We combined the reference functionality of xsi:schemaLocation and
xsi:noNamespaceSchemaLocation into one attribute, and eliminated the
namespace URI for each schema since the referenced Schemas already declare
the targetNamespace, and the XForms processor will have to load the Schema
anyway to validate the instance before submission.  It is the responsibility
of the server to provide valid URIs for the correct Schemas to the XForms
processor (client).

* Implementation Considerations
Popular XML Schema validators appear to support the ability to specify
required schema locations prior to processor the instance document, as shown
by these examples.
Prior to Schema validation, an XForms processor could gather the required
Schemas from the <xsd:schema> and xforms:model schema attribute sources and
provide them to the Schema processor.
(I'm sure others do as well; these were just easy to find.)
- Microsoft .NET Framework: XML Schema (XSD) Validation with Multiple
Schemas
 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconvalidationofxmlwithxmlvalidatingreader.asp
	Schemas are loaded using the Add method, at which time the 
	schema is associated with a namespace URI.

- Apache Xerces-J: Schema Properties:
      http://xml.apache.org/xerces-j/properties.html and search for
"external-schemaLocation"
	The XML Schema Recommendation explicitly states that the inclusion
of 
	schemaLocation/ noNamespaceSchemaLocation attributes is only a hint;

	it does not mandate that these attributes must be used to locate
schemas. 
	This property allows the user to specify a list of schemas to use. 
	If the targetNamespace of a schema (specified using this property)
	matches the targetNamespace of a schema occurring in the instance
	document in schemaLocation attribute, the schema specified by the 
	user using this property will be used (i.e., the instance document's

	schemaLocation attribute will be effectively ignored).  


Leigh.

-----Original Message-----
From: Roman Huditsch [mailto:roman.huditsch@hico.com] 
Sent: Wednesday, August 28, 2002 5:09 AM
To: www-forms@w3.org
Subject: [XForms] xforms:schema missing



Hi there,

taking a look at the new WD I realized that the former xforms:schema for a
W3C Schema integration is completely missing. The only hangover is the
@schema in the model element. Is that right? 
Why was it skipped?

wbr,
Roman Huditsch (hRHU )
Developer .:. Information & Application Engineering 
_____________________________________________________________________
hico Informations- und Kommunikations-Management Gesellschaft m.b.H.
TechLab, Thomas A. Edison Straße 2.
A-7000 Eisenstadt / Austria
phone: +43/2682/704-61-73; fax: +43/2682/704-71-61-10
e-mail: roman.huditsch@hico.com
Received on Wednesday, 28 August 2002 14:02:24 GMT

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