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

xsd:duration datatype validation

From: David Landwehr <david.landwehr@solidapp.com>
Date: Tue, 09 May 2006 11:29:36 +0200
Message-ID: <44606100.4030308@solidapp.com>
To: www-forms@w3.org

Hi

I have reread section 5.1 again and again in relation to the discussion 
about datatype etc. Now I see that there are some IMO strange wording 
regarding xsd:duration. This wording states: "XForms supports all XML 
Schema datatypes 
<http://www.w3.org/TR/xforms/index-all.html#def-datatype> except for 
|xsd:duration". What does this mean (e.g. what happens if a node has the 
type xsd:duration) and what is the intention of not including 
xsd:duration. |

The following XForms example runs in the Firefox extension and it does 
"incorrectly??" validate the xsd:duration. I guess the same will be so 
for most implementations....
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xforms="http://www.w3.org/2002/xforms"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <head>
    <xforms:model>
      <xforms:instance xmlns="">
        <root>
          <child>2</child>
        </root>
      </xforms:instance>
      <xforms:bind nodeset="child" type="xsd:duration"/>
    </xforms:model>
    <style>
      *:invalid {
        background-color: red;
      }
    </style>
  </head>
  <body>
  <xforms:input ref="child">
    <xforms:label>Child:</xforms:label>
  </xforms:input>
  </body>
</html>

Best regards,
David

-- 
--------------------------------------------
David Landwehr (david.landwehr@solidapp.com)
Chief Executive Officer, SolidApp
Web: http://www.solidapp.com
Office: +45 48268212
Mobile: +45 24275518
--------------------------------------------
Received on Tuesday, 9 May 2006 09:29:35 GMT

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