Transformacja dokumentów

Przykładowy arkusz XSLT

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>Pages</h2>
<table>
<tr>
<th>Id</th>
<th>Code</th>
<th>Is protected</th>
</tr>
<xsl:for-each select="pages/page">
<tr>
<td><xsl:value-of select="@id"/></td>
<td><xsl:value-of select="@code"/></td>
<td><xsl:value-of select="@is_protected"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

 

Przykład transformacji dokumentu XML przy użyciu arkusza XSLT umieszczonego w obiekcie jPALIO

$=(@transformationResult, $xml.transform($@xml, $designer.getObjectContent("samples.modules.utils.xml.xslt")))
$@transformationResult