If I use the XForms 1.1 datatypes that mimic the XML
Schema built-in datatypes I can specify a datatype but still have the value space of the type be nill (that is, the element may be empty and still be valid). However, if I add a constraint property, does that force the element to have content so that an empty element is invalid? For example, does this bind statement <xforms:bind nodeset="section1/ssNumber/part1" type="xforms:positiveInteger" constraint=". castable as xsd:integer and string-length(.) = 3" /> require content in the nodeset "part1" because of the constraint property? (The answer appears to be "yes".) If so, is there any way to have a constraint property yet still have the option of having an empty element? Thanks, Don ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Validation constraints must all be satisfied for the node to be valid.
Here, @type is satisfied, but @constraint is not, so the element is invalid. But you can write: constraint=". = '' or . castable as xsd:integer and string-length() = 3" -Erik On Apr 29, 2008, at 3:50 PM, Don Smith wrote: > If I use the XForms 1.1 datatypes that mimic the XML > Schema built-in datatypes I can specify a datatype but > still have the value space of the type be nill (that > is, the element may be empty and still be valid). > > However, if I add a constraint property, does that > force the element to have content so that an empty > element is invalid? For example, does this bind > statement > > <xforms:bind nodeset="section1/ssNumber/part1" > type="xforms:positiveInteger" constraint=". castable > as xsd:integer and string-length(.) = 3" /> > > require content in the nodeset "part1" because of the > constraint property? (The answer appears to be "yes".) > > > If so, is there any way to have a constraint property > yet still have the option of having an empty element? > > Thanks, > > Don > > > > ____________________________________________________________________________________ > Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Ah, yes. Excellent. Thanks.
Don --- Erik Bruchez <[hidden email]> wrote: > Validation constraints must all be satisfied for the > node to be valid. > > Here, @type is satisfied, but @constraint is not, so > the element is > invalid. > > But you can write: constraint=". = '' or . castable > as xsd:integer and > string-length() = 3" > > -Erik > > On Apr 29, 2008, at 3:50 PM, Don Smith wrote: > > > If I use the XForms 1.1 datatypes that mimic the > XML > > Schema built-in datatypes I can specify a datatype > but > > still have the value space of the type be nill > (that > > is, the element may be empty and still be valid). > > > > However, if I add a constraint property, does that > > force the element to have content so that an empty > > element is invalid? For example, does this bind > > statement > > > > <xforms:bind nodeset="section1/ssNumber/part1" > > type="xforms:positiveInteger" constraint=". > castable > > as xsd:integer and string-length(.) = 3" /> > > > > require content in the nodeset "part1" because of > the > > constraint property? (The answer appears to be > "yes".) > > > > > > If so, is there any way to have a constraint > property > > yet still have the option of having an empty > element? > > > > Thanks, > > > > Don > > > > > > > > > > > Be a better friend, newshound, and > > know-it-all with Yahoo! Mobile. Try it now. > > > > > > > -- > > 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 > > OW2 mailing lists service home page: > http://www.ow2.org/wws > > -- > Orbeon Forms - Web Forms for the Enterprise Done the > Right Way > http://www.orbeon.com/ > > > > -- > 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 > OW2 mailing lists service home page: > http://www.ow2.org/wws > ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |