X-Application Version: 3.1.2, 3.1.1
Tamino Version : 3.1.1
Platform : NT, Win2k, Solaris, …
WebContainer : Tomcat 3.3
JDK Version : 1.4.0
Anybody know how to actually use XSL in developing JSP pages in X-Application?? The examples and the documentation do not seem to help me in developing any JSP pages using XSL and also at the same time retrieving from Tamino. Can anybody help me??
[This message was edited by Christian Freytag on 26 Jul 2002 at 08:45.]
Hello,
within the current version 3.1.2 the Java API and the JSP tag library of X-Application do not directly support XSL processing.
XSL is used by the Generator of X-Application. Based on your XML schema it creates a structure file (XML file) for a high level description of the JSP pages to be generated. It uses XSL files to transform this structure file into the JSP pages. You can modify the structure file as well as the XSL sheets and regenerate the application. Therefore, have a look at the chapter ?Customization? of the documentation of the Generator.
If you are not interested in using XSL to produce JSPs, but you want to use XSL within a JSP to produce HTML, my proposal is:
- Java Scriplets for accessing the SessionContext to get the documents. Via a Scriplet you retrieve your document from the SessionContext. You invoke a XSL transformation with the XSL you want to use for outputting your HTML result. For getting the SessionContext have a look at file ?changelog.txt? within your X-Application installation directory.
- Extending a tag: you extend the display tag (class DisplayTag.java) by a new attribute (e.g. with name ?xsl?) containing the URL of the XSL file. If this attribute is set, you invoke a XSLT of the currently selected node and print out the result into the body content.
You request for XSL is interesting also for us. We are currently working on Plug-Ins which allow the integration of user defined code. We will check if a XSL transformation can be integrated via Plug-in for the next version of X-Application. The result could look like this
<directcommand type=?transform? document=?name of the doc to be transformed? arg=?URL of the stylesheet?/>
In this way, your request is an interesting use case for our Plug-In concept.
Thanks,
Christian.
[This message was edited by Christian Freytag on 13 Jun 2002 at 08:11.]
Hello,
I created an example for the current version in work. The invokation of the transformation is
<xapp:directelementaction type=“transform” select=“/Property/Address” arg=“http://localhost:8080/plugin/advanced/transformSheet.xsl”/>
Input for the transformation is the Sub-Tree starting with root node ‘Address’.
Setting the address of the stylesheet could be optimized in a way you can use a relative path for the XSL file.
So, the next version will definetely help you, if you are looking for this use case.
Bye,
Christian.
Hello,
after installing X-Application 3.1.3 and starting Tomcat you can invoke the plugin example for transformation.
Have a look at
http://localhost:8080/xapp
→ plugin
→ XSL Transformation
Bye,
Christian.