AnsweredAssumed Answered

How do I set maxLength of a string on an xforms template

Question asked by harrymoore on Feb 20, 2007
Latest reply on Feb 22, 2007 by arielb
Simple question: how do I set a limit on the lenth of an input string?

I found an example somewhere that showed how to use an xs:restriction but this does not appear to work:
<xs:simpleType name="string25">
    <xs:restriction base="xs:normalizedString">
         <xs:maxLength value="25"/>

<xs:element name="content_idx" type="string25" default="" minOccurs="1" maxOccurs="1">
             <alf:alert>Content ID is required</alf:alert>
             <alf:label>Content ID</alf:label>

Looks simple enough. Why doesn't it work?