Re: Insert PHP in HTML-Form via XSLT
Posted: Thu Jul 27, 2023 9:28 am
Hello,
One solution to ensure that the closing parenthesis in the PHP statement is not converted to ">" could be to use a CDATA (Character Data) section in your XSLT template. By wrapping the PHP statement with <![CDATA[ ... ]]>, you prevent the XML parser from interpreting the content, and it will be output as-is in the resulting HTML.
Another solution could be to perform a string replacement on the result of the PHP statement, something like:
Hope this helps.
Regards,
Florin
One solution to ensure that the closing parenthesis in the PHP statement is not converted to ">" could be to use a CDATA (Character Data) section in your XSLT template. By wrapping the PHP statement with <![CDATA[ ... ]]>, you prevent the XML parser from interpreting the content, and it will be output as-is in the resulting HTML.
Another solution could be to perform a string replacement on the result of the PHP statement, something like:
Code: Select all
<xsl:variable name="php01_replaced" select="replace($php01, '>', '>')" />
Regards,
Florin