Hey all,
I want to define my own xs:simpleType (for example e-mail) for use in <xforms:bind nodeset="x" type="email"/>. I red a thread about the same topic with dubinko of 2004. But there was no answer for that. I know I can use xml schema for validation of my model-instance, but thats not what I want. I want to use attribute constraint in combination with attribute type, but with my own type. I have seen some examples: <xforms:model> ... <xforms:bind nodeset="test" type="test"> <xs:simpleType name="test"> <xs:restriction base="xs:string"> <xs:maxLength value="5" /> </xs:restriction> </xs:simpleType> ... </xforms:model> But thats not working. How can I write a costum simpleType and use it in ops? thanks clemens -- 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 |
Administrator
|
Hi Clemens,
At this point, you cannot use custom types you have defined in your schema with <xforms:bind type="...">. If you do not want to validate the instance with a full schema, but want to have a simple <xforms:bind> expression, a workaround is to write an XPath expression that checks that the string has not more than 5 characters with <xforms:bind constraint="...">. Alex On 3/7/06, [hidden email] <[hidden email]> wrote: > Hey all, > > I want to define my own xs:simpleType (for example e-mail) for use in <xforms:bind nodeset="x" type="email"/>. > I red a thread about the same topic with dubinko of 2004. But there was no answer for that. > > I know I can use xml schema for validation of my model-instance, but thats not what I want. I want to use attribute constraint in combination with attribute type, but with my own type. > > I have seen some examples: > <xforms:model> > ... > <xforms:bind nodeset="test" type="test"> > <xs:simpleType name="test"> > <xs:restriction base="xs:string"> > <xs:maxLength value="5" /> > </xs:restriction> > </xs:simpleType> > ... > </xforms:model> > > But thats not working. > > How can I write a costum simpleType and use it in ops? > > thanks > clemens > > > > > -- > 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 > > > -- Blog (XML, Web apps, Open Source): 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |