Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


XForms datatypes

From: - <-@--.-->
To: NULL
Date: 7/2/2004 3:08:00 PM
I am using XSmiles 0.91 to evaluate W3C XForms. Everything is the below 
example is working OK, with the exception of the maxLength restriction 
on the "email" control, which the browser seems to ignore. The alert 
message is not displayed when "email" loses focus and the form submits. 
This is not the required behaviour as I need to apply restrictions to 
certain fields. Please note that the use of maxLength in this case is 
simply an illustration, XSmiles ignores other restrictions such as 
xs:pattern here too.

Can anyone explain where I am going wrong, or does XSmiles not support 
restriction of datatypes via XML Schema yet?

Thanks

Will

(example follows:)

<head>

<xf:model>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="emailaddress">
<xs:restriction base="xs:string">
<xs:maxLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
		
<xf:instance>

<communication xmlns="http://example.info">
<name/>
<email/>
</communication>

</xf:instance>

<xf:bind nodeset="my:name" id="bindname" required="true()"/>
<xf:bind nodeset="my:email" id="bindemail" type="xs:emailaddress"/>

<xf:submission id="submit1" method="get" separator="&amp;" 
action="http://abc.asp"/>

</xf:model>

</head>
<body>

<xf:input bind="bindname">
<xf:label>Name</xf:label>
<xf:alert>Please enter your name.</xf:alert>
</xf:input>

<xf:input bind="bindemail">
<xf:label>Email</xf:label>
<xf:alert>Please enter a valid email address.</xf:alert>
</xf:input>

</body>


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent