RE: Why are xsd:duration and xforms:duration not supported/defined?

Nick,

> A bit off topic, but I think we should consider supporting XML Schema 1.1 in a future version of XForms

That would be a good idea as the XML Schema 1.1 Assertions mechanism would prove useful. Currently, some additional, constraints that are expressed using the 'constraint' MIP in an XForm model could be moved into the schema as an assertion. I'm currently involved in some work where I express various bit of business logic as assertions in an XML Schema and then, as part of the form generation process, transform those assertions into MIP Constraints as part of the data bindings. It works OK but I currently have to hide the assertions in an xs:appinfo so as not to offend the XML Schema 1.0 processor that's currently in use.


Regards

Philip Fennell
Consultant

Mark Logic Corporation
www.marklogic.com<http://www.marklogic.com/>

E-mail: philip.fennell@marklogic.com<mailto:philip.fennell@marklogic.com>
Mobile: +44 (0)7824 830 866



From: public-forms-request@w3.org [mailto:public-forms-request@w3.org] On Behalf Of Nick Van den Bleeken
Sent: Wednesday, April 14, 2010 8:05 AM
To: John Boyer; public-forms@w3.org
Subject: RE: Why are xsd:duration and xforms:duration not supported/defined?

A bit off topic, but I think we should consider supporting XML Schema 1.1 in a future version of XForms (or at least W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes) they added xs:yearMonthDuration[1] and xs:dayTimeDuration[2] which are compatible with the versions in our namespace.

When we add support for XML Schema Definition Language (XSD) 1.1 Part 2:

*         Datatypes our range control should also support xs:yearMontDuration and xs:dayTimeDuration besides the variants in our namespace.

*         The strongly typed XPath 2.0 XForms extension functions (seconds() and months()) should also accept the XML Schema variants.

Regards,

Nick Van den Bleeken
R&D Manager

Phone: +32 3 821 01 70
Office Fax: +32 3 821 01 71
nick.van.den.bleeken@inventivegroup.com <mailto:nick.van.den.bleeken@inventivegroup.com>
http://www.inventivedesigners.com<http://www.inventivedesigners.com/>
Linked in<http://be.linkedin.com/in/nvdbleek>

1: http://www.w3.org/TR/xmlschema11-2/#yearMonthDuration
2: http://www.w3.org/TR/xmlschema11-2/#dayTimeDuration

From: public-forms-request@w3.org [mailto:public-forms-request@w3.org] On Behalf Of John Boyer
Sent: dinsdag 13 april 2010 23:40
To: public-forms@w3.org
Subject: Why are xsd:duration and xforms:duration not supported/defined?


We seem to go out of our way in Section 5.1 (http://www.w3.org/TR/xforms11/#datatypes-xforms) to not support the xsd:duration datatype.

There is even a NOTE saying that xforms:dayTimeDuration or xforms:yearMonthDuration should be used instead.

These are nice helper datatypes that have the advantage of not running into the confusion over how many days are in a month, but adding helpers should probably *not* get rid of the thing they're helping.  I think that is just being *too* helpful.

In any case, it is difficult at best to claim that we don't support xsd:duration.   Anything that you can put in an xsi:type or in an XML schema can also be put in a type MIP, so type="xsd:duration" just works (in my software, at least).

Moreover, if I generate a form from a schema, and a data node has type xsd:duration, there is really no choice but to fill that data node with a value which conforms to xsd:duration, yet we're essentially saying that I could not create that same form without a schema?  Makes no sense.

Since this all "just worked" for me, I actually discovered this while trying to figure out why type="xforms:duration" MIP assignment wasn't working.  I expected to be able to get a duration or empty string, but xforms:duration is undefined, due only to the spec.  I think it should just work too.

1.1 Errata?  Could be optional, then scaled up to recommended or required in 1.2.

Cheers,
John M. Boyer, Ph.D.
STSM, Lotus Forms
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer
Blog RSS feed: http://www.ibm.com/developerworks/blogs/rss/JohnBoyer?flavor=rssdw

--
This message has been scanned for viruses and
dangerous content, and is believed to be clean.
--

________________________________
Inventive Designers' Email Disclaimer:
http://www.inventivedesigners.com/email-disclaimer

--
This message has been scanned for viruses and
dangerous content, and is believed to be clean.
--

Received on Wednesday, 14 April 2010 13:56:56 UTC