[
Lists Home |
Date Index |
Thread Index
]
Hi Klotz,
Klotz said:
Why use //description, etc rather than /demo/description?
Actually, since XForms sets the XPath context node to be the document
element, you can jus tsay
<xforms:bind id="version" nodeset="version" constraint=". = '1.0'"/>
<xforms:bind id="name" nodeset="author/name"/>
<xforms:bind id="email" nodeset="author/email"/>
<xforms:bind id="description" nodeset="description"/>
<!-- snip -->
Didier replies:
Yes you are right about /demo/description.
Klotz said:
Actually it would be
<xforms:input
ref="version"><xforms:label>Version</xforms:label></xforms:input>
Didier replies:
Only if you want to use xforms widgets. If you implement the XForms engine
with XSLT which is, by the way, a kind of interpreter, and if you want to
use XHTML widgets, then you use
<xforms:submission id="submit"
xforms:replace="all"
xforms:action="http://mydomain.com/MyStorage"
xforms:method="PUT"/>
<xforms:instance src=http://myDomain.com/theChallenge.xml" />
.....
.....
<!-- an XHTML widget -->
<input ref="demo/version" type="text" name="version" size="20"/>
Klotz said:
Note that the context node being "/data" means that you can just use the ref
to ne the immediate child name of the toplevel element,
so it looks a lot like what XHTML 1 does with <input name="version"/>. In
fact, if you omit the <instance> from a model entirely,
XForms will notice that and make one up for you populated by elements with
names taken from the form controls bound to the model.
It's a good transition step from XHTML 1 to XHTML 2 or other XForms host
languages.
Didier replies:
I wasn't able to find what the spec says about that. Do you know where that
process is specified?
Cheers
Didier PH Martin
http://didier-martin.com
All the best
Mark
> Cheers
> Didier PH Martin
> http://didier-martin.com
>
>
>
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>
>
-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>
The list archives are at http://lists.xml.org/archives/xml-dev/
To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>
|