X-Application Version: 4.1.1
Tamino Version : 4.1.4.1
Platform : Win2k
WebContainer : Tomcat 4.1.17
JDK Version : 1.4.1
I am not sure whether this question is sensible at all, but here goes.
Is it possible (and if so how) to change the structure.xml document in order for the xapp:select to be generated for an element instead of changing the generated .jsp?
If not, is there somewhere else that this can be specified so that the changes in the .jsp are not lost during regeneration?
Thanks
Elsabe
Hello,
It is possible to change the structure.xml file. If you have changed its content, use the regenerate option of the Generator Gui.
Please, see also the chapter ‘Customization’ of X-Application’s documentation. This chapter is part of the Generator documentation.
Bye,
Christian.
Hi Christian
Thanks for the reply. I have looked at the documentation on changes to the structure file, but I do not see any reference to how to change the structure file in order for a ‘select’ tag to be generated in the JSP. Do you have examples of this.
Regards
Elsabe
Hello,
I checked the style sheets of the generator and could not find a rule for generating an xapp:select tag.
If you are familiar with XSL programming you could extend the style sheets of the generator: Add a rule (template) that transforms our own tag (e.g. select) of the structure file into an xapp:select tag. You shut add the template into basics.xsl and invoke the template within the templates that invoke
<xsl:apply-templates select="field" />.
Your tag ‘select’ would have the same status as a tag ‘field’ within the structure.xml file.
If you want to extend the generator in this way but need more information about the style sheet process, please let us know and we will support you.
Bye,
Christian.
I have found a way to do this but am not sure whether this is the ‘best’ way.
In the structure document I add an attribute to the element to indicate I want a selection list and as the value of the attribute I put the xquery statement required to populate the options.
In the basic.xsl, when it builds the xapp:edit tag I test to see if my new attibute exists for a field and if it does I build the xapp:select tag with all the required attributes as well as the
Hello,
Your solution sounds good. Better than the solution I proposed with the separate tag. Could you post your solution (basic.xsl) to the community? We could integrate it for a next version of X-Application.
The generation of the structure file is the result of traversing an XML schema. Do you have an idea when the generator should write the select attribute into the structure file? Or do you think that the schema does not hold information when it would be useful to create a xapp:select tag for an element / attribute.
Many thanks.
Bye,
Christian.
I don’t know Tamino schemas that well and have never used but maybe this type of information could be contained in an element?
I have attached my basic.xsl. I have also devised a mechanism to have radio buttons generated.
The changes are in the buildRealField template and I have created two new templates namely buildOptionsList and buildRadioButton.
An example from the structure.xml for the drop down list is
An example from the structure.xml for the radio button is
Thanks for the assistance.
Regards
Elsabe
basics.xsl (31.3 KB)