Page 1 of 1

Associate XSLT for form controls

Posted: Wed May 07, 2014 9:52 am
by VinceCgto
Hi, I'm trying to create form controls by associating an XSLT file in my XML document.
I know it's possible to use CSS, but for what I'm trying to do, this just doesn't seem to cut it.

I've even tried to add the simplest XSLT stylesheet but it just doesn't seem to be working. The documentation barely even mentions the possibility of adding an XSLT stylesheet.

Am I missing something or maybe even interpreting this function wrong?

Re: Associate XSLT for form controls

Posted: Wed May 07, 2014 2:49 pm
by alex_jitianu
Hello,

If you are referring to the author mode editing then the only way to add form controls is through CSS by using the oxy_editor extension function.

You can associate an XSLT with an element:
1. directly by using the action Associate XSLT/CSS Stylesheet
2. or through a transformation scenario

After that, you can transform the document using action Apply transformation scenario on the toolbar.

Best regards,
Alex

Re: Associate XSLT for form controls

Posted: Wed May 07, 2014 3:13 pm
by VinceCgto
Right sorry, yeah I meant the author mode editing. But not the offline editor, I'm using the online web applet which doesn't seem to support transforming with XSLT.
Anyway, so it's only possible with CSS, I feared as much.

Well, I do have a follow-up question about the CSS form controls.

I don't think it's possible but I'm actually looking to implement this structure (it's QTI, but that doesn't really matter) into a combo box, is that possible?

<inlineChoiceInteraction>
<inlineChoice identifier="a">Can</inlineChoice>
<inlineChoice identifier="b">Would</inlineChoice>
</inlineChoiceInteraction>


Best Regards,
Vince

Re: Associate XSLT for form controls

Posted: Wed May 07, 2014 3:39 pm
by alex_jitianu
Hello,

Yes you can but not by using the built-in combo box form control. You'll have to implement a custom form control using out Java based API. If you are interested I can send you the source code for the built-in combo box form control because it is a great starting point for what you want to do. In theory, all you have to change is how the presented values are obtained and how they are committed.

Best regards,
Alex

Re: Associate XSLT for form controls

Posted: Wed May 07, 2014 4:10 pm
by VinceCgto
I was actually just looking into the possibility this feature, so the source code for the built-in combo box won't be necessary.

You've been a great help, thanks a lot Alex.

Best Regards,
Vince