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

Re: What is exciting in XSLT 2.0 (Was: Re: para

Subject: Re: What is exciting in XSLT 2.0 (Was: Re: parameters in XSLT 2.0)
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Thu, 9 Jun 2005 06:03:41 +1000
what is exciting
>    James> also can an XSLT 2.0 just have xsl:function definitions aka;
>
>    James> <xsl:transform
>    James> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>    James> xmlns:xs="http://www.w3.org/2001/XMLSchema"
>    James> xmlns:str="http://example.com/namespace" version="2.0"
>    James> exclude-result-prefixes="str">
>
>    James> <xsl:function name="str:reverse" as="xs:string"> <xsl:param
>    James> name="sentence" as="xs:string"/> <xsl:sequence select="if
>    James> (contains($sentence, ' ')) then
>    James> concat(str:reverse(substring-after($sentence, ' ')), ' ',
>    James> substring-before($sentence, ' ')) else $sentence"/>
>    James> </xsl:function>
>
>    James> </xsl:transform>
>
>
>    James> so libraries can be built up?
>
> Yes.
>
> This is a stylesheet (module) that has only built-in templates, and
> so, if invoked as the principal stylesheet, will not call the
> function.
>
> But if included or imported into another stylesheet, then indeed the
> function might be called from other templates.
> --
> Colin Adams
> Preston Lancashire


I think James is asking here if the above stylesheet can be a part of
a *compiled* library.

A while ago I asked this question in relation to Saxon's (8.x)
stylesheet compilation feature. The answer by Mike Kay was that only a
main stylesheet module (and all the modules it imports/includes) can
be invoked from a compiled stylesheet.

This is obviously a negative answer.

What is necessary is something like:

   <saxon:include-compiled-module href="libraryModuleURL"/>


Cheers,
Dimitre Novatchev

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.