Dynamics of Transformation Rules

Previous Next

See Also

XSL transformation rules can be reused for many generated web pages if the rules do NOT contain hard-coded data model information. You can often write transformation rules in a more dynamic or in a less dynamic way.

"Less dynamic way" here means: hard-coding information that already is available in the Combined.xml file. Typical examples are the hard coding of headings, prompts, or the (known) number of fields. Here is an example of a less dynamic transformation rule, in which headings are hard-coded:

<xsl:template match="Combined/Page/ContainerControl[@id='ResultGroup']/ContainerControl[@id='ResultColumnGroup']/GridControl[@id='MultiRecordResultGrid']">

<table>

<tr>

 <th> ID </th>

 <th> Name </th>

 <th> Address </th>

 <th> City </th>

</tr>

</table>

</xsl:template>

Sometimes you MUST hard-code this information in the transformation rule, because it is easier, or because the information is not available in the Combined.xml file. But in many cases, you may want to find a more dynamic solution.