Re: exslt node-set extension request
Mike Brown <[email protected]> Tue, 26 Dec 2006 15:14:44 -0700 (MST)
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Message-ID | <[email protected]> |
(not that you'll see it, given your suspiciously generic return address, but for the archives' sake...) subscriptions wrote: > > Hi All, > > I am looking for the exslt node-set() extension. > > Although it is said this should be in the download item 'common' on the > exslt website, the file downloaded doesn't contain this (anymore). Also > a negative on other files on the exslt website. > > Can anybody provide me with this extension? > As usual, the answer is that there never was one, and you're looking in the wrong place. That's not your fault; the exslt.org web site does a terrible job of explaining the situation to people who head straight to the Downloads page. EXSLT is a set of specs, not implementations, for XSLT extension functions and elements. Some of them are based on proprietary extensions in XSLT processors. node-set() is the prime example -- very similar functions were in high demand and were implemented in several processors before being unified as EXSLT's node-set() ... this was why EXSLT was started, actually. The spec for each extension has a version number (a simple 1, 2, 3, 4, and so on). There's an effort underway to update some of the specs and publish the aggregate collection of them as "EXSLT 1.0", for what it's worth. For many (but not all) extensions, we offer a named template written in pure XSLT. It's intended to provide functionality that's *approximately* equivalent to that described by the extension spec, so that if a native implementation of the extension you want isn't available, you'll have something to fall back on. These pure-XSLT offerings are based on the earliest versions of the specs and aren't guaranteed to be perfect. They're not reference implementations. One of the EXSLT extensions is <func:script/>, which, if implemented, would allow for extensions to be implemented in any language supported by the processor. MSXML has something similar to this in its <msxsl:script/> extension. Our downloads include some JavaScript and VB sample implementations that rely on func:script / msxsl:script to work. For some extensions, like node-set(), it's not possible to implement them in pure XSLT 1.0, so no named template has ever been available. Some haven't been implemented in anything compatible with msxsl:script either. So, those kinds of extensions must be implemented in your processor. You might have to write it yourself, if your processor provides a means for you to write extensions; check its docs. What processor are you using? If it's the one built into Firefox, you have to wait for Firefox 3.0, according to https://bugzilla.mozilla.org/show_bug.cgi?id=193678 If it's MSXML, you'll probably want http://mvp-xml.sourceforge.net/exslt/ which I believe grew out of Dare Obasanjo's work at Microsoft in 2003 (see the references on that page). Mike