caucho
Resin
FAQ
Reference Guide
JavaDoc
Demo
Tutorial

JSP page
Config
URLs
Database Forms
XTP Copy
Hello Tag
Vary Filter
HardCore
Mailing Forms
Beans
Cache
XSL Filter
run-at

Formatting
XTP Page
Strict XSL
JSP Tag Libraries with XTP
JSP Tag Libraries with StyleScript
 Strict XSL

XTP Page
XTP Copy
JSP Tag Libraries with XTP

Resin, of course, also supports strict XSL syntax. Strict XSL is more verbose and less readable, but has the advantage of being more standard.

The following stylesheet is exactly equivalent to the previous one but uses strict XSL syntax.

stylesheet.xsl
<xsl:stylesheet>

<!-- make sure '<' is not printed as '&lt;' -->
<xsl:output disable-output-escaping='true'/>

<!-- copy input to output -->
<xsl:template match='*|@*'>
<xsl:copy>
<xsl:apply-templates select='node()|@*'/>
</xsl:copy>
</xsl:template>

<!-- rewrite <a href> -->
<xsl:template match='a[@href]'>
<a href='<%= response.encodeURL("{@href}") %>'>
  <xsl:apply-templates select='node()|@*[name(.)!="href"]'/>
</a>
</xsl:template>

</xsl:stylesheet>

XTP Page
XTP Copy
JSP Tag Libraries with XTP
Copyright © 1998-2001 Caucho Technology. All rights reserved.
Copyright © 1998-2001 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark, and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc.