There is a really easy answer.  PHP does not work inside XSL.

Their are a couple of way you can get at your variables, pass them in as
parameters, or make them part of your XML.

-Greg

-----Original Message-----
From: John Risby [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 9:28 AM
To: Sablotron Mailing List
Subject: [Sab] including php in xsl



Hi all,

in my xsl code the following works

<script language="php">echo $varname;</script>

but if i put it inside an attribute, ie,

<a><xsl:attribute name="href"><script language="php">echo
$varname;</script></xsl:attribute></a>

it doesn't ? any idea why.

I need to do this (or similar) because i cannot put the php variables i need
into the xml. The php classes that write out the xml are to be generic and
the additional variables are to be added at will.

thanks for any help
john

ps. still suffering from the segfault 11's in apache. setting KeepAlive Off
and MaxRequestsPerChild 1 in httpd.conf is a fix, albeit not a good one.
this is on a test server at present but we can't really do that when it goes
live.


Reply via email to