Like the title tells: Is it possible to write a PHP-Function in a XSL-Document and call it afterwards?
I have no case, where I wanna do that. Its just a thing it came into my mind while learning XSL.
In XSL you can compose something like:
<xsl:processing-instruction name="php">
...some php...
</xsl>
The PHP code will be run in your rendered page. Is it possible to create e.g. a PHP Function in the processing-instruction and call it later (in the same template)?
Pseudo-Sample:
<xsl:template>
<xsl:processing-instruction name="php">
...some php processing $foo...
</xsl>
<xsl:variable name="foo" select="xpath/node">
<xsl:value-of select="call-php-function-with-$foo"/>
</xsl>
I'm looking forward to your solutions/approaches :)
Chris