【发布时间】:2018-10-22 23:26:15
【问题描述】:
我正在使用自定义字典 (CustomDictionary.xml) 进行代码分析,它的工作方式应有尽有。但是,我不断收到警告,提示我 XML 文件未正确定义其 XSD 架构位置:
我在我的机器上找到了 XSD (CustomDictionary.xsd),并将其 URI 的方案指定为类型file:
file:///C:/Program%20Files%20(x86)/Microsoft%20Visual%20Studio%2012.0/Team%20Tools/Static%20Analysis%20Tools/Schemas/CustomDictionary.xsd
有了这个 URI,Chrome 就可以很好地定位 XSD 文件。也就是说,我如何从CustomDictionary.xml 中正确引用CustomDictionary.xsd?
到目前为止我发现表明以下应该工作,但它不是:
<Dictionary
xmlns="http://www.w3schools.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/ file:/.../CustomDictionary.xsd">
(请注意,为了清楚起见,我截断了指向 CustomDictionary.xsd 的路径。)
对我做错了什么有什么建议吗?
【问题讨论】:
标签: xml visual-studio visual-studio-2013 xsd code-analysis