Re: [xslt] Xpath commands inside attributes



If you're including the item below as a string in PHP (in double quotes or a HEREDOC), don't forget to use a backslash to escape the $var so that PHP doesn't try to treat it as its own PHP variable...

Thus, try:

<a href="{\$var}"></a>


Brett


http://www.pas-world.com wrote:
Hello,
I am trying to do something like this in XSL stylesheet:

<a href="{count(.)}"></a>
<a href="{$var}"></a>

using variables works under Mozilla Firefox processor, but do not work
under PHP XSLT Processor that is based in xmlsoft.org.


Anyone know if this syntax should work?




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]