xslt
XML Technologies
Release Notes
attachGoldenThread
cast
copy
cutGoldenThread
cwu
delete
dpml
dump
entrypoint
exists
expire
fls
guid
hotRestart
HTTPCookie
HTTPRedirect
isUnix
locationToXPath
lock/unlock
log
loglevel
luceneIndex
luceneSearch
mapper
mapper-export
md5
mls
netkernel:*
new
Orchextra
org.ten60.util.aspell
org.ten60.util.image.SVG2PNG
org.ten60.util.image.Text2PNG
org.ten60.util.image.xchart
plainTextToXHTML
regex
relativizeURI
requestWithArgs
resolveURI
serialize
sleep
sqlBatch
sqlBooleanQuery
SQLEncodeElement
SQLEscapeXML
sqlQuery
sqlUpdate
stm
stopWatch
StringToCanonicalString
throw
toRelaxNG
trace
validateDTD
validateRNG
validateSchematron
validateXSD
xacml
xform
XHREFlinker
XHTMLredirect
XHTMLTidy
xinclude
xmltidy
xpatheval
xpur
xquery
xrl
xsign
xslfo-fop
xslfo-fop
xslt
xverify
License
Change History
NetKernel History
Acknowledgements

xslt / xsltc

Used to perform an xslt transform.

Module

urn:org:ten60:netkernel:ext:xml:ura

Definition

Format

<instr>
  <type>xslt</type>
  <operand>foo.xml</operand>
  <operator>bar.xsl</operator>
  <target>this:response</target>
</instr>

Syntax

ElementRulesDescription
typeMandatory xslt or xsltc
operandMandatory the resource to which xslt transform is applied
operatorMandatory the resource containing the xslt transform
paramOptional optional parameter document
targetMandatory Fragment OKthe target resource

The xslt accessor is used to perform an XSLT transform on the operand document. XSLT is a W3C standard for transforming XML documents.

The operand is the XML resource to be transformed, operator contains the xslt transform document.

An optional parameter can be passed into the XSLT in param. The parameter can be referenced by declaring a top-level <xsl:param> in the XSLT stylesheet. Here's an example stylesheet which simply passes the param back as the transform result.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:param name="param" />
  <xsl:template match="/">
    <xsl:copy-of select="$param" />
  </xsl:template>
</xsl:stylesheet>

Compiled Transforms

The underlying Xalan XSLT accessor supports transform compilation. Compiled transforms can be used by specifying xsltc as the instruction type. Use of compiled transforms can lead to significant performance gains, but may come at the cost of an initial compilation overhead. Your application context will determine whether to use interpreted or compiled transforms.

Transform Caching

All XSLT transformations, both interpreted and compiled, are cached and frequently used transforms will not need to be rebuilt. This transparent caching gives good performance gains.

Example

Pipelined XSLT Transfrom

<idoc>
  <instr>
    <type>xslt</type>
    <operand>foo.idoc</operand>
    <operator>bar.xsl</operator>
    <target>var:var</target>
  </instr>
  <instr>
    <type>xslt</type>
    <operand>var:var</operand>
    <operator>bar2.xsl</operator>
    <target>this:response</target>
  </instr>
</idoc>

An example of performing sequential pipelined xslt transforms. The response of the first transform is put in the variable var. The variable is then used as the operand to a second xslt tansform with the result being sent to the response.


(C) 2003, 1060 Research Limited
© 2003,2004, 1060® Research Limited
1060 registered trademark, NetKernel trademark of 1060 Research Limited