Re: [xslt] JavaScript support in libxslt?



On Sat, Nov 01, 2003 at 07:13:08AM +1100, Alexander Johannesen wrote:
> Thanks for the swift reply, Daniel,
> 
> Daniel Veillard <veillard@redhat.com> wrote:
> >    - technical: adding a hard dependancy on mozilla or javascript 
> >      package is ruled out, using dynamic loading, if portable, then
> >      why not.
> 
> So it is not supported, and no one is planning such a thing. The thing
> is that since PHP now comes with LibXML istead of Sablotron, and all
> those applicatons can't be used for PHP 5.0, unless re-compiled for
> the Sablotron parser. Just a hassle for us who don't distribute PHP
> with our applications; we can't reply on people simply installing PHP
> themselves cleanly anymore.

  Well I did look into this a bit some time ago, and at the time decided
it was more of a hassle than a gain. Maybe from a PHP perspective things
are different.

> >    - philosophical: as you experienced, as soon as you mix the XSLT
> >      language and another one it's not portable anymore, it really
> >      depends how it is done, and so far I'm not too convinced by any
> >      attempt like xsl:script, using extension functions and elements
> >      on the other hand is relatively clean.
> 
> Oh, there are many ways of doing things, of course, but having JS as
> part of the transformation in xsl:script is sometimes a godsent when
> you're dealing with rapid development and prototyping, and of course

Well xsl:script never got blessed as part of the standard, precisely because
it was really bad in term of interoperability. Implementing extension functions
is far cleaner. If you trade long-term maintainance and conformance to
the spec for rapid prototyping, that's fine, but you know that that part
of the trade-off will bite you in the future, don't be too surprised or
angry when this happen. xsl:script only shortly made it into the 1.1 working
draft and died quite fast, it's not present in 2.0, you'd better not rely
on this.

> re-distribution of applications; it dramatically cuts down on install
> and configure problems, for one. And, as you already have support for
> Python, why not a more general link-in to support others? Sablotron
> has iconv and js1.5 support across several platforms, so it can be done.

  I have cross platform support for iconv when present. For Python 
the support comes from the python bindings, not from the library itself
it's very different from adding a hard requirement from libxml2 or libxslt
to python, there is none, there is just another brick which provides
libxslt support from python. If you want to provide one for Javascript
in that way this is fine by me, I take patches.

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]