我想要一個模板匹配這樣的:軸在XSLT模板匹配
<xsl:template match="//content[parent::(@type='async')]">
<table>
<thead>
<xsl:apply-templates select="row[@type='header']" />
</thead>
<tbody>
<xsl:apply-templates select="/row[@type='data']" />
</tbody>
</table>
</xsl:template>
有了這個XML:
<document type="async">
<content>
<!-- Some rows with types -->
</content>
</document>
我的問題是<xsl:template match="//content[parent::(@type='async')]">
,我該如何使這項工作?
由於語法無效,我們應該如何知道你想要它做什麼?我們不能期望通過閱讀不符合他們的程序來滿足您的要求。 – 2014-12-19 17:17:21