Comments (6)
We use type="select1"
in NEMO. Not for any particular reason, just b/c that's what the examples probably used when we first built our XML renderer.
Here is a snippet:
<bind nodeset="/data/*itemcode2*_1" type="select1" required="true()"/>
<bind nodeset="/data/*itemcode2*_2" type="select1"/>
<bind nodeset="/data/*itemcode3*_1" type="select1" required="true()"/>
<bind nodeset="/data/*itemcode3*_2" type="select1" required="true()"/>
<bind nodeset="/data/*itemcode3*_3" type="select1" required="true()"/>
</model>
</h:head>
<h:body>
<select1 ref="/data/*itemcode1*">
<label ref="jr:itext('*itemcode1*:label')"/>
<hint ref="jr:itext('*itemcode1*:hint')"/>
<item>
<label ref="jr:itext('*optcode1*')"/>
<value>*optcode1*</value>
</item>
<item>
<label ref="jr:itext('*optcode2*')"/>
<value>*optcode2*</value>
</item>
</select1>
(Don't mind the *'s in the refs, those get substituted during test runs.)
Would this continue to work in future or would we have to change something? I'm not against changing stuff to help clean up the spec. Just curious about the upgrade path/doing this without breaking stuff.
from xforms-spec.
https://dimagi.github.io/xform-spec/#data-types
from xforms-spec.
It's actually not mentioned under datatypes, but there are some other references to it. So either we remove entirely or add to datatypes.
I vote for removing entirely.
from xforms-spec.
there are some other references to it
I only see them in the bindings section. Anywhere else?
As part of doing this, we should probably explicitly say that the bind type can be any type. This is what W3C XForms says here:
Data Binding Restrictions: Binds to any simpleContent. The restriction to binding simpleContent exists when the choices are authored as part of the user interface control as shown in this section. Element itemset (described in 9.3.6 The itemset Element) creates dynamic selection items and allows the available choices to be obtained from an XForms Model. When itemset uses the value element, the restriction to binding simpleContent remains in effect. However, the itemset also allows for the selection and deselection of subtrees of instance data using the copy element, and when using that construct, the data binding restriction to simpleContent is relaxed, but the form control must bind to an element with no mixed content.
I don't think this spec includes selection and deselection of subtrees.
from xforms-spec.
That's all, I think.
from xforms-spec.
Thanks, @smoyth! Existing clients would continue to work with select1
and select
bind types for backwards compatibility so it should be seamless for users of clients and form builders.
Where it becomes an issue is if analysis tools that expect the bind to identify selects get a form with a string
bind and then don't do what they're supposed to do.
from xforms-spec.
Related Issues (20)
- Add %W (week number) to format-date() and format-date-time() as in XPath 3.1
- Mention that readonly values can be changed by calculation/setvalue
- min() and max() comply with XPath 2.0, not XForms 1.0 HOT 3
- Correct description for uuid() with argument HOT 2
- current() specification is too narrow HOT 1
- jr:count can only be set to a reference
- Broken link to issues in XForms spec
- Add odk-instance-load event and odk:recordaudio action
- correct atan2 function description
- Add instanceName
- if() not described correctly HOT 7
- finish date() spec HOT 1
- Add unacceptableAccuracyThreshold
- Add deep links to data types in documentation HOT 1
- Spec indicates that XPath node unions are supported but it seems that they aren't
- Add geojson external secondary instances
- Proposal: support <hint> element as the child element of <group>
- Add update addition to entities sub-spec HOT 1
- Document approach to styling HOT 1
- Only use group in repeat as repeat instance name if it's the repeat's only child
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xforms-spec.