Is it possible to write PHP code in an XSLT file? Here is an example:
<xsl:template match="property">
<?php echo "Hello World"; ?><br />
<xsl:value-of select="title" /><br />
<xsl:value-of select="island" />, <xsl:value-of select="city" /><br /><br />
Bedrooms: <xsl:value-of select="bedrooms" /><br />
Bathrooms: <xsl:value-of select="bathrooms" />
</xsl:template>
What I am trying to do is dynamically resize an image. I created a script that is called in an image tag and does the resizing. The image tag is declared in the XSLT file like this:
<img src=\"../scripts/resize_image.php?image=$path&max_width=100&max_height_100\" border=\"0\">
The XSLT breaks on the $path variable though. I'm not sure how to get it to recognize $path and pass it to the resize image script. I hope this makes sense, it's a tough one for me to explain!
Thanks for any help.