W3C home > Mailing lists > Public > public-forms@w3.org > January 2013

XForms 2.0 spec review: The var element

From: Erik Bruchez <erik@bruchez.org>
Date: Tue, 22 Jan 2013 15:32:22 -0800
Message-ID: <CAAc0PEXqpU3666qTq0JaOcF5MTervPjyvVYevhT-o0RYX=aeeg@mail.gmail.com>
To: public-forms@w3.org, "public-xformsusers@w3.org" <public-xformsusers@w3.org>
All,

I have spent some time reviewing the spec text for the var element. I
had fixes, clarifications and rewording and so directly made the
changes to the wiki for people to review. Here is the diff:

http://www.w3.org/MarkUp/Forms/wiki/index.php?title=XForms_2.0&diff=3765&oldid=3759

Some notes about the changes:

- Removed the XSLT 2 terminology "variable-binding element". It's not
very useful in our case as we don't have any other "variable-binding"
elements. I find that this simplifies the text a bit.
- The "value" attribute was said to be mandatory, but it is in fact optional.
- Clarified evaluation of variables within actions: made it clearer
this concerns specifically the action element, and also made it
clearer what happens when using while/iterate.
- Clarified variables outside of actions to "anywhere a control can
appear". We could support variables in other places, such as within
controls (e.g. before/within a label or itemset element). Ideally we
should, but e.g. our implementation doesn't support this yet.
- We disallow shadowing. XSLT allows it. I could go either way. I
added a note to mention that this is unlike XSLT.
- Added "Variable Evaluation" sub-section.

In addition, I think we need a few more examples:

1. Variable declared within an action and used within the action.
2. Variable declared outside an action and used within the action.
3. Variable declared within an action and used within the action with @iterate.
4. Variable used by a control binding.
5. Variable used by a control label or itemset.
6. Inline text.
7. Show that context/model can be used on xf:var.

Comments welcome.

-Erik
Received on Tuesday, 22 January 2013 23:33:10 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 October 2013 22:06:58 UTC