Does the @type attribute change while the form is being edited? I
guess that's what you plan to do.
If it is static, then you can generate it with XSLT upon
initialization. If it is dynamic, you cannot use XSLT when generating
the page, because that XSLT is not going to be run while the XForms
engine is in charge of the UI (note that this is a difference with the
Classic XForms engine, where things like xforms:repeat updates would
go through an entire page generation and therefore run an XSLT page
With XForms NG, you can use an xforms:switch construct to achieve
something like this.
You start with selecting the case based on the initial value of the
@type attribute. Then you select a different case with the
xforms:toggle action, when the value of the @type attribute
changes. The trick is to capture the right event though: how do you
want change the value of the @type attribute?
[hidden email] wrote:
> i'm trying something and i don't know if its possible.
> <xforms:instance id="todo-list">
> <todo description="">
> <task description="" done="" type="something"/>
> <!-- /\
> <!-- ||
> <!-- this field
> if this is my model. and I want to use an option where i have my
> type field fore. Is it possible to show an xforms input field if the
> type is for example "input" and an textarea if it's "textarea"?
> I have tried to use XSl into my xform but that doesn't seem to
> work. Maybe it's possible with an XPL but i don't know how.