XForms Bind Constraints and the DMV Forms example

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

XForms Bind Constraints and the DMV Forms example

Henrik Pettersen
All,

I've bee digging around the source code for the DMV Forms example, trying to find the regular expression that expresses this constraint:

> Must contain letters and '-' only, start with a capital letter, and be 20 characters long at most.

but I have not been able to find it. All I can find is this:

<xforms:bind nodeset="dmv:personal-information">
  <xforms:bind nodeset="dmv:birth-date" type="xs:date"/>
  <xforms:bind nodeset="dmv:name/dmv:first-name | dmv:name/dmv:last-name" required="true()"/>
  <xforms:bind nodeset="dmv:driver-license-number | dmv:birth-date" required="true()"/>
</xforms:bind>

<xforms:input incremental="true" ref="dmv:first-name" class="dmv-first-name">
  <xforms:label ref="instance('resources-instance')/labels/first-name"/>
  <xforms:alert ref="instance('resources-instance')/alerts/first-name"/>
</xforms:input>

I was expecting to find a constraint attribute on the bind element, but there is no such attribute used here.

How is the regular expression for the firstname resolved? Where am I not looking? Has anyone found this?

Thanks!

Sincerely,
Henrik Pettersen
Advanced Computation Laboratory
Cancer Research UK




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: XForms Bind Constraints and the DMV Forms example

Erik Bruchez
Administrator
Henrik,

This is done through the schema, dmv-schema.xsd.

-Erik

Henrik Pettersen wrote:

> All,
>
> I've bee digging around the source code for the DMV Forms example,
> trying to find the regular expression that expresses this constraint:
>
>>  Must contain letters and '-' only, start with a capital letter, and be
> 20 characters long at most.
>
> but I have not been able to find it. All I can find is this:
>
> <xforms:bind nodeset="dmv:personal-information">
>   <xforms:bind nodeset="dmv:birth-date" type="xs:date"/>
>   <xforms:bind nodeset="dmv:name/dmv:first-name |
> dmv:name/dmv:last-name" required="true()"/>
>   <xforms:bind nodeset="dmv:driver-license-number | dmv:birth-date"
> required="true()"/>
> </xforms:bind>
>
> <xforms:input incremental="true" ref="dmv:first-name"
> class="dmv-first-name">
>   <xforms:label ref="instance('resources-instance')/labels/first-name"/>
>   <xforms:alert ref="instance('resources-instance')/alerts/first-name"/>
> </xforms:input>
>
> I was expecting to find a constraint attribute on the bind element, but
> there is no such attribute used here.
>
> How is the regular expression for the firstname resolved? Where am I not
> looking? Has anyone found this?
>
> Thanks!
>
> Sincerely,
> Henrik Pettersen
> Advanced Computation Laboratory
> Cancer Research UK
>
>
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws