W3C home > Mailing lists > Public > www-forms@w3.org > December 2003

RE: Critical Questions

From: Borgrink, Susan <sborgrink@progeny.net>
Date: Tue, 9 Dec 2003 13:25:40 -0500
Message-ID: <FB041607EAE6DF4697B73E29142D1C4B015549@es3.progeny.net>
To: KHOURY Shérine (Dr&T) <sherine.khoury@sncf.fr>, <www-forms@w3.org>


	Your first question was a little confusing, but I think you are asking if there is a way to auto-generate an XForms document from the XML Schema.  I don't know of any tool or application that will auto-generate XForms from the XML Schema.  It would be very difficult if not impossible to be able to create controls without know what kind to create, or to create the data and binding without knowing what the data is or what to bind to.

	In regards to your second question, if by conform you mean being valid within the constraints of the XML Schema, then with the proper setup, the XForms processor your using should be able to check for that.

<?xml version="1.0" encoding="ISO-8859-1"?>
<form xmlns:xfm="http://www.w3.org/2002/xforms/cr" 
      xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
  <xfm:model schema="#mySchema" xsd:id="InputTest">
    <xfm:submission action="somewhere.do" indent="false" method="post"
    omit-xml-declaration="false" xsd:id="controlsSubmission"/>
          An Example String
  <schema id="mySchema">
    <xsd:element name="example">
          <xsd:element name="field" type="xsd:string"/>

In this example, the schema element has an id of "mySchema"  this is referenced in the model element above by the attribute schema (schema="#mySchema").  This reference will tell the XForms processor to check that they data conforms to the XML Schema written.

I hope this helps,

Susan Borgrink

FormFaces Developer

-----Original Message-----
From: KHOURY Shérine (Dr&T) [mailto:sherine.khoury@sncf.fr]
Sent: Tuesday, December 09, 2003 3:12 AM
To: 'www-forms@w3.org'
Subject: Critical Questions

Hello guys, 

I'm very new to XForms, and need your help to understand what XForms can and
cannot do:
Suppose we need to collect data conformly to an XML Schema:
1- Is there a way to generate the form for collecting that data
automatically from the XML Schema?
2- I know that the instance data collected in the form is returned to the
server between  <instanceData>...</instanceData>. Is there a way to get the
data in the instanceData element to be conform to the XML schema without any
processing? Or is using some XSLT to do so a must?

Please, if you have any information to give me, I will appreciate it very
Thank you
Received on Tuesday, 9 December 2003 13:25:40 UTC

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