Re: [xslt] dilemma



On Sun, Apr 28, 2002 at 01:58:03PM -0700, Dan Allen wrote:
> While writing a PHP class for PEAR, a situation arose where I had to
> make a cross-parser xsl stylesheet so that people who are using
> the sablotron extension could run the stylesheet as well as those
> using the domxml xslt functions (libxslt).  
> 
> In my stylesheet, I use some custom functions.  Since sabltron only
> supports javascript functions, I had to write functions using the
> exslt extension for libxslt and another set for the javascript
> extension of sablotron, which worked fine...until...
> 
> I tried to combine them.  Normally I could so something like this
> 
> <func:script implements-prefix="my" language="javascript"><![CDATA[
> function foo() 
> {
> }
>   ]]>
>   <xsl:fallback></xsl:fallback>
> </func:script>
> <func:function name="my:foo">
>   <func:result></func:result>
>   <xsl:fallback></xsl:fallback>
> </func:function>
> 
> Except one major problem.  The namespace for functions in sablotron
> is
> 
> http://www.exslt.org/functions
> 
> and the one for libxslt is
> 
> http://exslt.org/functions
> 
> Hence, if I have the first, libxslt doesn't recognize the fallback
> where it is, and if I have the second vice-versa.
> 
> So, I am going to make a statement that could be wrong, but should
> sablotron change the namespace to not-include the 'www' or is there
> a way around this problem?

  Well it's relatively clear from
    http://exslt.org/func/index.html

that the namespace for functions in EXSLT is "http://exslt.org/functions";,
you should report this as a bug in sablotron in my opinion.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]