[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSLT 1.1 comments

Subject: Re: XSLT 1.1 comments
From: "Steve Muench" <Steve.Muench@xxxxxxxxxx>
Date: Tue, 13 Feb 2001 08:49:07 -0800
script inside xslt
| >  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.