从xslt在href中传递多个参数 [英] passing multiple parameters in href from xslt
本文介绍了从xslt在href中传递多个参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在通过xslt将xml文档转换为html.在中传递多个参数时,我得到了错误的输出.以下是代码:
I am transforming an xml document to html by xslt. I am getting wrong output while passing multiple parameters in . Following is the code :
<A href='index.html?id={str[2]}&classname={str[3]}'><xsl:value-of select="str[4]"/></A>
这适用于单个参数.有什么建议吗?
this works with single parameter.any suggestions ?
推荐答案
<A href='index.html?id={str[2]}&classname={str[3]}'><xsl:value-of select="str[4]"/></A>
这不是格式正确的XML文档.
This is not a well-formed XML document.
在格式正确的XML文档中,必须转义未出现在注释中或未用作实体引用名称开头的&
字符.
In a well-formed XML document, an &
character that isn't in a comment or isn't used as a start of an entity-reference name, must be escaped.
这是正确的:
<A href='index.html?id={str[2]}&classname={str[3]}'><xsl:value-of select="str[4]"/></A>
这篇关于从xslt在href中传递多个参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文