Subject: Re: XSLT 1.1 comments
From: "Steve Muench" <Steve.Muench@xxxxxxxxxx>
Date: Tue, 13 Feb 2001 08:49:07 -0800
|
| > Its the idea of any non xsl vocab inside my stylesheet that I
| > object to.
|
| I don't really think there is much special about the distinction of
| being in the same file. If it's some script inside an msxml:script
| element or an extension function accessed via a java: URI pointing at
| some class that is hopefully on my java classpath, the effect is the
| same: it will either work or it won't depending on circumstances.
| So I don't see stylesheets using msxml:script as any less portable than
| an xsl 1.0 stylesheet using the XSL engine's current java binding to
| an extension function.
Also, realize that since the normal <xsl:import> and <xsl:include>
work for <xsl:script> elements as well, you can create "library"
stylesheets that look like:
<!-- My library -->
<xsl:stylesheet xmlns:xsl="..." xmlns:foo="..." xmlns:bar="..." >
<!-- example of ecmascript internal to this (library) stylesheet -->
<xsl:script implements-prefix="foo" language="ecmascript">
function upper-case() { }
function lower-case() { }
</xsl:script>
<!-- example of ecmascript external to the stylesheet -->
<xsl:script implements-prefix="bar" language="ecmascript"
src="external-uri.js"/>
Then your stylesheet can do:
<xsl:stylesheet xmlns:xsl="..." xmlns:foo="..." xmlns:bar="..." >
<!-- no extension code in here -->
<xsl:import href="mylibrary.xsl"/>
<xsl:template match="...">
:
<xsl:value-of select="foo:upper-case(.)"/>
:
</xsl:template>
</xsl:stylesheet>
______________________________________________________________
Steve Muench, Lead XML Evangelist & Consulting Product Manager
BC4J & XSQL Servlet Development Teams, Oracle Rep to XSL WG
Author "Building Oracle XML Applications", O'Reilly
http://www.oreilly.com/catalog/orxmlapp/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
DPawson - Tue, 13 Feb 2001 10:31:44 -0500 (EST)
- David Carlisle - Tue, 13 Feb 2001 11:13:58 -0500 (EST)
- Steve Muench - Tue, 13 Feb 2001 11:50:36 -0500 (EST) <=
DPawson - Tue, 13 Feb 2001 11:50:03 -0500 (EST)
Peter Flynn - Tue, 13 Feb 2001 12:00:19 -0500 (EST)
Scott_Boag - Tue, 13 Feb 2001 12:29:17 -0500 (EST)
Scott_Boag - Tue, 13 Feb 2001 12:29:22 -0500 (EST)
|
|