Writing XSLT to generate orbeon form xml content dynamically for all the controls

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Writing XSLT to generate orbeon form xml content dynamically for all the controls

vikaha
Hi

I am trying to create Orbeon form dynamically. For that, I have written an
XSLT to generate the xml content for some controls. But there are lots of UI
controls for which I have to stille write XSLT. The XSLT basically needs to
create the xml content for the needed controls bsed on input data(text and
text typ like text field, table etc.) .
So wanted to know if there is any existing template which could help me
write XSLT for all the avaiable orbeon form controls?

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Writing XSLT to generate orbeon form xml content dynamically for all the controls

Alessandro  Vernet
Administrator
Hi Vikas,

You could use the template provided by each component. It is part of the
component metadata, and is indeed used by Form Builder to insert the
component into the form. For instance, search for `<templates>` in the
source of the number component:

https://github.com/orbeon/orbeon-forms/blob/master/form-runner/jvm/src/main/resources/xbl/orbeon/number/number.xbl

Would this work for the use case you have in mind?

-Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Writing XSLT to generate orbeon form xml content dynamically for all the controls

vikaha
Hi

Thanks for the reply.
So are you suggesting to use XBL and not XSLT?. I am not very much aware
with XBL. Can I generate the the orbeon form data xml using XBL?

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Writing XSLT to generate orbeon form xml content dynamically for all the controls

vikaha
In reply to this post by Alessandro Vernet
Also we have a scenario where we want to differentiate between the fields
which are dynamically generated and the one which are added using
formBuilder. So is there any kind of metadata we can add in content xml
during component creation, so that it does not break during rendering and we
can use it for differentiating the component?

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Writing XSLT to generate orbeon form xml content dynamically for all the controls

vikaha
In reply to this post by Alessandro Vernet
Hi

Thanks for your inputs. For our usecase, we need some kind of API if
available from Orbeon Form engine which can take component name and return
us the component xml. This will help us to create the component on the fly.
Please provide your inputs.

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Writing XSLT to generate orbeon form xml content dynamically for all the controls

Alessandro  Vernet
Administrator
In reply to this post by vikaha
Hi Vikas,

I wasn't suggesting that you write your own form definition generation code
in XBL, but that your code uses the control templates found in the XBL files
bundled with Orbeon Forms. Currently, there is no API that returns the
template: instead, you'll need to write code that locates the XBL for a
given control, and extracts the template from that XBL. You'll let me know
if this works for you.

-Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet