Jump to content

is there future for xsl in php?


kaloo

Recommended Posts

Hello,

I have problem which I hope someone could help me with. It hope it's still on topic, also, I did not find any suitable answers when searching the forum.

Here's the problem:
- I want to transform xml with xsl
- The transformation has to happen on the server, as not all browsers manage it themselves (such as opera)
- PHP (4.3.10) does not support XSL without Sablotron and expat
- The server is not mine, so I can't do anything about it

Other comments:
- The server does not have sql (it costs extra), also sql seems unnecessary for small databases
- XSL has certain capabilities CSS doesn't

Any suggestions on what to do? Should I just forget XML, or is there a future in it? It seems like such a basic thing, and really irritates me. For once, ASP seems a better way, with only 10 lines of writing.

Any help, or thoughts regarding this will be highly appreciated.

kaloo
Link to comment
https://forums.phpfreaks.com/topic/36321-is-there-future-for-xsl-in-php/
Share on other sites

[quote]Any suggestions on what to do?[/quote]

Upgrade the server. You can't expect old software to be up to date with tech.

[quote]For once, ASP seems a better way, with only 10 lines of writing. [/quote]

ASP has no native xml/xsl handling objects, .NET maybe but not pure ASP.
Thank you for your rapid reply thorpe!

[quote]
Upgrade the server.
[/quote]

I should really push my webhost to get up to date, but they will not really care too much I'm afraid. Perhaps it's time to have a look at other suppliers.

[quote]
ASP has no native xml/xsl handling objects
[/quote]

You're propably right, I have never used it. I just saw this code:

[code]
<%
'Load XML
set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = false
xml.load(Server.MapPath("cdcatalog.xml"))

'Load XSL
set xsl = Server.CreateObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load(Server.MapPath("cdcatalog.xsl"))

'Transform file
Response.Write(xml.transformNode(xsl))
%>
[/code]

Anyway, thanks for your respond.
I picked it up at http://www.w3schools.com/xsl/xsl_server.asp

By the way, with upgrading the server, would you mean compliance with xslt, or do newer versions have it automatically? I read the requirements at http://www.php.net/manual/en/ref.xslt.php, but am somewhat confused.

Thanks for your reply.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.