FW: XForms - how easy is maintenance?

I was thinking along the lines of:

XML:
<doc>
	<fruit>banana</fruit>
	<phone>+6421-210-1234</phone>
</doc>

SCHEMA:
<doc>
	<fruit type="enum" value="banana|orange|apple"/>
	<phone type="pattern" value="\+\d{4}-\d{3}-\d{3,}"/>
</doc>

Looking up datatype from an XSD is pretty expensive to do in javascript.

Regards,
Ben

-----Original Message-----
From: JOHANSSON, Justin [mailto:Justin.JOHANSSON@baesystems.com] 
Sent: Wednesday, 12 March 2003 2:07 p.m.
To: 'Ben Nolan'; www-forms@w3.org
Subject: RE: XForms - how easy is maintenance?


Picking up on Ben Nolans observation

"functionality back to schemas (and possible a new form of schema that
isn't so bloody hard to parse) would make xforms more applicable to
real-world situations."

In my (personal) opinion, such a schema already exists.

It's called RELAX NG.

FFI, see "the next generation schema language for XML:
clean, simple and powerful."

http://www.oasis-open.org/committees/relax-ng/

Regards,

Justin Johansson
Intranet Developer
South Australia




-----Original Message-----
From: Ben Nolan [mailto:ben@ripcord.co.nz]
Sent: Wednesday, 12 March 2003 11:09
To: AndrewWatt2001@aol.com; www-forms@w3.org
Subject: RE: XForms - how easy is maintenance?



/quick-rant-mode on

I have similair worries, in my particular instance (financial data
gathering) - I am trying to absolutely minimize the amount of logic and
layout in the xforms/xhtml pages. 

One way I'm thinking of approaching this is to do away with
select1/select/etc - and use only the <input/> element - with the
display of the field entirely dependent on the datatype of the ref'd
data - and the appearance attribute. Eg - enumerated datatypes are
listed as a (dropdown|checkboxes) - depending on the appearance
attribute.

I do data-type constraints at xforms-deactivate time, and validation for
the included inputs (only !null at this stage) at xforms-submit time.

I'm very new to xforms and xml and haven't had time to totally get my
head around the best way to do things - but I think tying a lot more
functionality back to schemas (and possible a new form of schema that
isn't so bloody hard to parse) would make xforms more applicable to
real-world situations.

I fear xforms will rapidly degenerate into a cross-browser javascript
type mess otherwise.

Regards,
Ben Nolan

Ripcord Technology

-----Original Message-----
From: www-forms-request@w3.org [mailto:www-forms-request@w3.org] On
Behalf Of AndrewWatt2001@aol.com
Sent: Tuesday, 11 March 2003 5:46 a.m.
To: xforms@yahoogroups.com; www-forms@w3.org
Subject: XForms - how easy is maintenance?



I guess ease of maintenance is a little in the eye of the beholder.

As I work with XForms-containing code it seems to me that XForms, with
its 
binding between different parts of the code and the potential for 
event-processing code to be widely separated in large pages, has the 
potential to create many maintenance difficulties.

It reminds me of the tangle that early forms of JavaServer pages could 
produce once they moved beyond the trivial. Obviously the issues aren't 
identical.

It seems to me that XForms has similar potential to be less than easy to

maintain.

Have others been considering this issue? Any thoughts about approaches
which 
can minimise the likely problems?

Andrew Watt

Received on Wednesday, 12 March 2003 14:56:26 UTC