[英]How do I set get variables in xslt?
I have the following problem while working in XSLT: 在XSLT中工作时遇到以下问题:
I want to make this link: 我想建立这个链接:
<a href="http://www.website.com/product?title=example&number=09">Click me</a>
..in XSLT... ..在XSLT ...
But I have no idea how. 但我不知道怎么做。 Right now it doesn't work because XSLT does not know the get symbols as ''?
现在它不起作用,因为XSLT不知道get符号为''? and '&'.
和'&'。
Thank you 谢谢
& -> &
" -> "
Reference: http://www.w3.org/TR/REC-xml/#syntax 参考: http : //www.w3.org/TR/REC-xml/#syntax
<a href="http://www.website.com/product?title=example&number=09">Click me</a>
or 要么
<a href="{$vUrlPath}?title={$vTitle}&number={$vNum}">Click me</a>
where The variables above have the necessary values. 其中上述变量具有必要的值。
In XML the following characters must be always escaped, whenever they are not within a comment and are not used in their XML role (denoting markup or entity reference): 在XML中,只要以下字符不在注释中且未在其XML角色中使用 (表示标记或实体引用) ,就必须始终对其进行转义 :
<
--> <
<
- > <
&
--> &
&
- > &
You need to use the escape characters for special characters: 您需要将转义字符用于特殊字符:
http://www.dpawson.co.uk/xsl/sect2/N2215.html http://www.dpawson.co.uk/xsl/sect2/N2215.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.