Re: Php5 - xsl extension not working



Chuck Anderson wrote:
Rik Wasmus wrote:
On Tue, 06 May 2008 08:00:02 +0200, Chuck Anderson <websiteaddress@xxxxxxxxx> wrote:

Rik Wasmus wrote:
On Mon, 05 May 2008 05:11:51 +0200, Chuck Anderson <websiteaddress@xxxxxxxxx> wrote:


I can tell I'm not alone in my confusion, as I've been using Google to find a solution to this problem and all I can find is the same question, but no solution.

I am running Php 5.25 (Windows binary from php.net) as an Apache 2.0.55 module on Windows XP.

I have enabled the xsl extension - php_xsl.dll - in php.ini and indeed, when I look at phpinfo I see all the needed libraries (i.e., DOM/XML, libXML, XSL, libxslt) are enabled.

Yet, if I try to call xslt_create(), I get:
"Fatal error: Call to undefined function xslt_create() in ....."

Any idea what I need to do to get this working?

Detail from phpinfo:
-------------------------
dom

libxml

xml

xsl
XSL enabled
libxslt Version 1.1.17
libxslt compiled against libxml Version 2.6.26
EXSLT enabled
libexslt Version 0.8.13

And XSLT?


I seem to have it all enabled now I was trying to use the Php4 functions in Php5.

http://nl2.php.net/manual/en/xslt.installation.php
Check out sablot.dll, expat.dll, and iconv.dll.

Those are for the Php4 implementation, only (as far as I can tell).

P.S: for PHP >= 5 I'd recommend XSL instead of XSLT.

I'm not sure what you mean here,

Instead of using these: http://nl2.php.net/manual/en/ref.xslt.php
Use these: http://nl2.php.net/manual/en/class.xsltprocessor.php

but I would like to understand, as I think I'm on to a new way of doing things (for me) by converting MySQL data to XML and using XSL transform to create the HTML output.

Be very sure you _need_ that. IMHO, XML is usefull for storage (which you could not need because you allready have a database for storage, but perhaps some caching be usefull), or communication/data sharing between scripts, which you also don't mention.

In most projects, I'd say the conversion database -> XML -> HTML would be an unnecessary step, and database -> HTML is just a lot less overhead.

What you say does make sense to me. I have only just now delved into xml - xsl so I could include it in my resume. And indeed, it seems a pretty simple tool to use. Where I think it's taking me now, as I explore my possibilities with it, is to show me how to modularize my Php - > html scripts better (like the xsl templates).

The next thing I think I'll try with xml/xsl is a simple customized CMS (for instance, one that lets a site owner change a Links page). I think something like that may be easier than using MySQL. Either way, I want the experience so I can include it on my resume.

I'm still pondering how to merge Php and xml/xsl. My guess is that I could use Php to create xsl files on the fly .... or to include them on the fly. But the more I think about that, the more I think, like you say, that simply modularizing my Php content templates (to be like like xsl template files) and getting my content from MySQL will be the most flexible and efficient.

I appreciate the help and advice.


Rik is correct. XML is not intended to be an intermediate step between the database and HTML. Rather, it is intended as a means for machine-to-machine transfer of data, i.e. one webserver picking up XML data from another and displaying it in a specific format.

Using XML as an intermediate step between your database and HTML is an unnecessary step which adds much more overhead to the server.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================

.



Relevant Pages

  • Re: onclick - reassign new function with parameters after displaye
    ... It creates an HTML document which looks and acts correctly. ... The orginal XSL is creating a record that shows data from two different ... The form reads in those global variables. ... XML Node that forms the context of your little XSL. ...
    (microsoft.public.scripting.jscript)
  • Re: onclick - reassign new function with parameters after displaye
    ... As far as XML data, it is not on the client side, and my limted ... as global parameter the info I need to get correct record from HTML, ... needed into XSL proscessing. ... The form reads in those global variables. ...
    (microsoft.public.scripting.jscript)
  • Printing HTML from memory (no user interaction)
    ... application in C# that converts text from XML with an XSL to a HTML ... The string writer contains the information I wanted as HTML. ... The real problem is that I cannot parse the ...
    (microsoft.public.dotnet.csharp.general)
  • Printing HTML from memory (no user interaction)
    ... application in C# that converts text from XML with an XSL to a HTML ... The string writer contains the information I wanted as HTML. ... The real problem is that I cannot parse the ...
    (microsoft.public.dotnet.general)
  • Printing HTML from memory (no user interaction)
    ... application in C# that converts text from XML with an XSL to a HTML ... The string writer contains the information I wanted as HTML. ... The real problem is that I cannot parse the ...
    (microsoft.public.dotnet.academic)

Loading