我是xslt的新手.我有以下问题.我需要在xml中删除theAttribute特定元素(例如div)中的特定属性(在示例中).即
<html>
<head>...</head>
<body>
<div id="qaz" theAtribute="44">
</div>
<div id ="ddd" theAtribute="4">
<div id= "ggg" theAtribute="9">
</div>
</div>
<font theAttribute="foo" />
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
成为
<html>
<head>...</head>
<body>
<div id="qaz">
</div>
<div id ="ddd">
<div id= "ggg">
</div>
</div>
<font theAttribute="foo" />
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
where属性theAtribute已被删除.我找到了这个, http://www.biglist.com/lists/xsl-list/archives/200404/msg00668.html,我试图找到合适的解决方案.
即 <xsl:template match="@theAtribute" />
从整个文件中删除它...和其他像匹配,如果选择等等没有什么工作.. :-(你能帮我这个吗?这对我来说听起来微不足道,但是对于xslt,我根本无法应付...
谢谢大家