【发布时间】:2011-11-30 13:14:22
【问题描述】:
我在 XML 模式中有组定义。像这样:
<attributeGroup name="my_attributes">
<attribute ref="ns:foo" />
<attribute ref="ns:bar" />
</attributeGroup>
另外,我有一个 XML 转换,我希望能够在其中重用这些定义。是否可以创建与此类组匹配的模板?可能是这样的:
<xsl:template matchGroup="my_attributes">
<foobar>
<xsl:copy-of select="@*"/>
<xsl:value-of select="." />
</foobar>
</xsl:template>
【问题讨论】: