Last updated November 14, 2008 17:18, by Ralph Soika
Feedicon  

Using the IX REST Service it is possible to access and modify any process using a simple HTTP based protocol. Details about the IX REST Service Subproject can be read here.

XSL Transformation

One of the most powerfull features of the IX REST Service is the XSL Transformation feature. This feature allows to transform any Workitem or WorkItem Collection into any kind of output. For example it is possible to transform workitem collection into a HTML Table or complex MS Excel sheet. To transform a Workitem or worktiem collection use the ?OpenXML feature to generate a XML representation of a workitem.

Example:

 http://localhost:8080/myapp/RestService/workitems?openXML

To transform this xml output into another format the optional param XSL is used. Example:

  http://localhost:8080/myapp/RestService/workitems?openXML&xsl=WEB-INF/classes/stylesheet.xsl

This command will transform the XML output using a Stylesheet available through the WebApplication. Such a stylsheet can be stored directly into the classpath of the web module.

Encoding and Contenttype

To additional params allow to control the contenttype and character encoding of a XSL Transformation. For example to generate a MS Word Document using the IX REST Service you can use the following command

Example:

  http://localhost:8080/myapp/RestService/workitems?openXML&xsl=WEB-INF/classes/stylesheet.xsl&contenttype=application/msword&encoding=ISO-8859-1

This will enforce the launch of a Office application like MS Word or OpenOffice Writer and also generates Output using the ISO-8859-1 charater encoding. The Encoding is necessary to control the output in detail. It is recommanded to use the same encoding like used in the stylesheet. The stylesheet can be stored inside the application (web module) or another classpath accessible through the servlet engine. Be careful using the encoding param to be identically to the encoding of the stylesheet. Best practice is to use UTF-8. If you use utf-8 encoding make also sure that the stylesheed located in the web module is stored also in utf-8 format. Often using Windows IDEs the xsl file will have a window specific character encoding. If the encoding did not match the generated output will possible not display all characters in the expected way.

XSLT Processor

If you need a special version of a XSLT Processor for your XSL transformation process you can simply add a different one to your web module like the version provided by the JEE Server environment. So the IX REST Service will take the xslt processor provided directly in the lib folder of your web module. For example to add Xalan 2.7 to your web app using Maven you simply need the following dependency in your pom.xml

 <dependency>
   <groupId>xalan</groupId>
   <artifactId>xalan</artifactId>
   <version>2.7.0</version>
 </dependency>
 

Notice that you did not need to change the IX REST Service Module itself!

  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close