xsl-list
[Top] [All Lists]

Re: [xsl]Putting PHP Code in XSLT?

2007-09-21 03:31:45
Hi,

 Just to test, here is what I have:

<xsl:processing-instruction name="php">echo "Hello!"; ?</xsl:processing-instruction>

The source code of the section above is there, but it is not working. When I take the ? off, the product becomes <?php echo "Hello!"; > which is not in HTML format.

The other thing is, why don't we need to do this with Javascript?

Alice

Quoting David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk>:


   I have some PHP code somewhere that can provide this function, but I
don't know if I can put it in XSLT. If I can, does anyone have any idea
of where I put it?

XSLT just generates a file, it doesn't need to know what language the
file contains, whether it is english or german or php is all the same.

There doesn't need to be any interaction between the PHP and XSLT
engines, if you generate code that looks like php, most likely by
<xsl:processing-instruction name="php">....
xslt will generate
<?php ....
and so if you pass that to a php engine on the server the code ... will
be executed.

David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--






--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>