如何将 html 标签放入 XSL 样式表中?
我有 python 脚本,可以使用 stylesheet.xsl 将 data.xml 转换为 html。 我在将 html 标签插入样式表时遇到问题。 我想将所有生成的值放入表格单元格中。也许有经验的人可以帮助我?
xsl:choose
xsl:when test="$NECoords = 'true'"
xsl:value-of select="concat($PtStr, $NthStr, $EastStr, $ElevStr, ' ', $TimeStr, $hzPrec, $vtPrec, $PDOP, $aRMS, $NbrSat, $NbrInt)"/>
/xsl:when>
我想知道如何将以上连接的字符串放入输出 html 文件中的表格单元格中,例如:
每个值都应放入单独的单元格中,如下所示:
I have python script that converts data.xml to html using stylesheet.xsl.
And i have a problem with inserting html tags into the stylesheet.
I would like to put all the generated values into table cells. maybe someone experienced could help me?
xsl:choose
xsl:when test="$NECoords = 'true'"
xsl:value-of select="concat($PtStr, $NthStr, $EastStr, $ElevStr, ' ', $TimeStr, $hzPrec, $vtPrec, $PDOP, $aRMS, $NbrSat, $NbrInt)"/>
/xsl:when>
I would like to know how to put above concatenated strings into table cells in output html file, like:
Every value should be put to separate cell, like this:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如何使用
我认为这段代码会生成类似
我不知道
元素是否存在问题的内容,在这种情况下你必须转义它们 (
& lt;>
)。也许您必须将此代码段添加到 xsl:stylesheet 声明中。
http://www.w3schools.com/xpath/xpath_functions.asp#string
how about using
I think that this code would generate something like
I don't know if there are problems with the
<td>
elements, in this case you have to escape them (< >
).maybe you have to add this snippet to the xsl:stylesheet declaration.
http://www.w3schools.com/xpath/xpath_functions.asp#string