You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

为何使用xmllint验证Office Custom UI XML时出现重复属性错误?

Office CustomUI XSD验证异常问题
  • 已获取Office CustomUI规范2.0版本的XSD文件。
  • 在macOS上使用xmllint工具(基于libxml)验证下方XML文档时,出现大量「重复属性」错误(例如id、label等属性被提示重复定义):
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
    <ribbon>
        <tabs>
             <tab id="TabTest">
                <group id="GroupTest" label="TEST">
                    <button id="ButtonTest" label="TEST"/>
                </group>
            </tab>   
        </tabs>
    </ribbon>
</customUI>
  • 执行的验证命令:
xmllint --noout --schema customUI.xsd customUI.xml
  • 但使用微软自家的XML 6.0库可以成功完成该XML与XSD的校验,请问为何xmllint无法正常通过验证?

内容的提问来源于stack exchange,提问作者Jamie Garroch - MVP

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.02 20:17:42