[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] How to use Extensions


Subject: Re: [xsl] How to use Extensions
From: "Bob DuCharme" <bob@xxxxxxxxx>
Date: Tue, 29 May 2001 13:43:41 -0400

> I have read something about extensions, but I have not undertood really
how
> can I use them, and, mainly, how can I ceate my own extensions. Could you
> help me on this?
> All the Info I have found is about how to use a particular extension, but
> not how do they work or, I repeat, how can I create them.

I guess you've noticed that the XSLT 1.0 spec says "This version of XSLT
does not provide a mechanism for defining implementations of extensions."
Instead, check out your XSLT processor's documentation: if it's written in
Java, it should show you (and hopefully demonstrate!) the Java way to
implement an extension element or function, and if it's written in C++, it
should show you the C++ way. For further help, each processor usually has
its own mailing list where you can find people more intimate with the inner
workings of that processor; the coding of extensions is a popular topic on
these lists.

The spec does describe the element-available function and the concept of
fallback, both of which are important for the robust use of XSLT extensions.

As a bit of background, the XSLT 1.1 Working Draft, which seems to be on
permanent back burner status while the Working Group focuses on XSLT 2.0,
did offer a way to define extension functions right in your stylesheet. The
disadvantages of this--mainly how it would encourage developers to put too
much stylesheet logic in the JavaScript code in their xsl:script element
instead of using the appropriate XSLT elements for this--were extensively
debated on this mailing list.

good luck,

Bob DuCharme            www.snee.com/bob             <bob@
snee.com>      see http://www.snee.com/bob/xsltquickly for
info on upcoming "XSLT Quickly" from Manning Publications.




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords