Re: [xsl] the future of xslt

Subject: Re: [xsl] the future of xslt
From: Tony Graham <Tony.Graham@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 23 Jun 2008 11:47:42 +0100
On Sun, Jun 22 2008 20:28:11 +0100, colin@xxxxxxxxxxxxxxxxxx wrote:
>>>>>> "Tony" == Tony Graham <Tony.Graham@xxxxxxxxxxxxxxxxxxxxxx> writes:
>     Tony> Of course, it may instead be that some other open source C
>     Tony> XSLT 2.0 processor appears, but if it did, it might well be
>     Tony> advised to also have a libxslt-compatible API, given the
>     Tony> Perl, Ruby, PHP, C++, and Python bindings for libxslt that
>     Tony> are in use today.
>
> I keep meaning to provide a C binding to Gestalt - it isn't very much
> work to do. But somehow I never find the time.
>
> But it surely wouldn't be compatible with libxslt, as that would imply
> a similar architecture.

IMO, to be generally useful in the C/Linux and scripting language
environments, a XSLT processor would have to fake the
xsltApplyStylesheet() call, at least fake accepting and producing
xmlDocPtr representations of parsed documents, and fake the libxslt
error handler functions.

An alternative would be to promulgate a TraX-like C API for XSLT
processors so multiple implementations can behave alike, but you'd need
to either establish that your XSLT processor isn't just a curiosity so
that people want to use the API or do the work yourself of also making
the libxslt adapter and the language binding adapters for the common
API.

xmlroff does have wrappers for both libxml2 documents and libxslt (so
the code isn't littered with dependencies on libxml2 and libxslt).  It
would be comparatively simple to wrap an alternative XSLT processor if
it could do "run this stylesheet on this parsed document", but harder to
support an alternative representation of XML documents since the XSL
formatter needs to pull apart the result of the XSLT transformation (and
AFAIK, the only common C DOM API is libxml2's).

We haven't discussed commas yet, but even so, I think we're getting
off-topic for this list.

Regards,


Tony Graham                         Tony.Graham@xxxxxxxxxxxxxxxxxxxxxx
Director                                  W3C XSL FO SG Invited Expert
Menteith Consulting Ltd
XML, XSL and XSLT consulting, programming and training
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
Registered in Ireland - No. 428599   http://www.menteithconsulting.com
  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
xmlroff XSL Formatter                               http://xmlroff.org
xslide Emacs mode                  http://www.menteith.com/wiki/xslide
Unicode: A Primer                               urn:isbn:0-7645-4625-2

Current Thread