Home : OpenEdit SDK : Programming OpenEdit : X S L T Generation
X S L T Generation
OpenEdit allows you to use XSLT language on the server side for rendering structured data.
Example
You can find an example here: http://demo.openedit.org/sandbox/apps/xslt/test.html
Files:
hotbooks.xml - this is the data file with a list of books
booklayout.xls - This is an XSLT file for rendering the look and feel
When a visitor goes to hotbooks.html OpenEdit will open up hotbooks.xml to look for the data.
Configuration
To enable XSLT the generator:
/apps/hotbooks.xconf
<page>
<generator name="composite" accepts="*.html">
<generator name="xslt" />
<generator name="velocity" />
</generator>
<inner-layout />
<property name="virtual">true</property>
<property name="xsltaddrequestparameters">true</property>
<property name="xsltlayout">/apps/xslt/booklayout.xsl</property>
</page>
The stack of Generators are run from top to bottom. You can also use a jsp generator and embbed JSP logic in your XSLT
If you do not want to have Velocity and XSLT logic mixed up then you can remove the composite generator and use: <generator name="xslt" accepts="*.html"/>
