XForms and Schemas

J

Jonathan

Does anyone know if it's possible to do the following:

I currently have an XML schema set up, part of which includes an
enumerated datatype (based on string) giving a list of values that I
want for a particular element.
Is there any way to bind this to a 'select' or 'select1' element in
XForms without having to list out all the choices again on the XForm:
in other words it needs to grab the values straight from the schema.

Any help would be very much appreciated

Thanks
 
M

Martin Honnen

Jonathan said:
Does anyone know if it's possible to do the following:

I currently have an XML schema set up, part of which includes an
enumerated datatype (based on string) giving a list of values that I
want for a particular element.
Is there any way to bind this to a 'select' or 'select1' element in
XForms without having to list out all the choices again on the XForm:
in other words it needs to grab the values straight from the schema.

I think the problem is that all XForms attribute like ref or nodeset are
using XPath to point into an XForms <instance> element while the XML
schema doesn't usually sit in the <instance>.
However if you move it there then you can use XPath with an <itemset
nodeset="path to enumeration"> element to load the values from the schema:
http://home.arcor.de/martin.honnen/xforms/bindingSelectToEnumeration.xml

I am new to XForms so there might be other (and easier) ways.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top