RE: AW: [PHP-DEV] PHP-sablotron
| From: | Wez Furlong | Date: | Fri, 01 Sep 2000 15:29:11 +0000 |
| Subject: | RE: AW: [PHP-DEV] PHP-sablotron | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-31584@lists.php.net to get a copy of this message | ||
I was looking at implementing a Xalan extension; the API seemed a bit
"heavy" (To tranform a file using a style sheet takes around a screenful of
includes and object declarations before you get to the one line that outputs
the file), and the size of the libs (a few MB, although this might include
debug info) seemed a bit over the top.
From what I saw, it would be possible to have an API like this:
// Precompile and register the XSL as a persistent resource.
// If already registered, return the compiled version (check based on
filename and ctime)
$xsl = xalan_compile_stylesheet("foo.xsl");
// Perform the transformation, perhaps using a cached processor (per
thread?)
xalan_transform_file("foo.xml", $xsl);
The thing that disuaded me from going for it was that in my fairly quick
examination of the library, I didn't see anyway of returning the output in a
buffer: all the examples dump the output to a file/stdout using the C++
IOStream stuff (which I think will make things harder when used in php).
--Wez.
> -----Original Message-----
> From: Derick Rethans [mailto:d.rethans@jdimedia.nl]
> Sent: 01 September 2000 15:50
> To: Ludwig Ruderstaller
> Cc: PHP Development List; sterling@php.net
> Subject: Re: AW: [PHP-DEV] PHP-sablotron
> Ludwig Ruderstaller wrote:
>
> > Hi,
> > What is with the Xerces and Xalan lib ? I think this couple
> has all the
> > features we would need, and it is in not so early dev state.
>
> There is nothing wrong with it (I think), but I read from
> http://xml.apache.org/index.html
> this:
> Xalan is currently available in Java, and available in
> Alpha form for C++.
>
> I think Alpha code is in early dev too. My opinion is also
> that Xalan has a
> much more
> difficult API, while Sablotron provides an easy API. But is
> there somthing
> wrong with having
> both extensions. I don't think so.