我正在为一些XML编码的查找辅助工具开发XSL样式表。在集合内容的详细描述级别,我有一些容器,如下所示:
<container type="folder">1</container>我需要在容器中同时选择@type和Numer值,但是我所能做的就是拉出number。我应该如何构造我的查询以获取folder 1
发布于 2011-07-25 23:45:13
如果当前节点为容器:
<xsl:value-of select="concat(@type, ' ', text())"/>输入XML:
<container type="folder">1</container>XSLT:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="container">
<xsl:value-of select="concat(@type, ' ', text())"/>
</xsl:template>
</xsl:stylesheet>输出:
folder 1https://stackoverflow.com/questions/6818698
复制相似问题