<?xml version="1.0"?>
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.01.xsd"
xmlns:xsl="http://www.milyn.org/xsd/smooks/xsl-1.1.xsd">
<!--
Break out the <date> field into separate "time", "day", "month" and "year" fields using Groovy.
This makes the complex date field value consumable by something like XSLT.
-->
<resource-config selector="header date">
<resource>/example/DateFormatter.groovy</resource>
<param name="input-format">EEE MMM dd HH:mm:ss z yyyy</param>
<param name="output-format">
time=HH:mm
day=dd
month=MM
year=yy
</param>
</resource-config>
<!--
Transform the document (as a whole) using XSLT. The complex date field has already been preprocessed into
separate fields using Groovy (see above config) - XSLT can handle it easily now :-)
-->
<resource-config selector<xsl:xsl applyOnElement="$document">
<resource><xsl:template>/example/order.xsl</resource>xsl:template>
</resource-config>xsl:xsl>
</smooks-resource-list>
|