在我的架构中,我有:
<xs:element name="html-script">
<xs:annotation>
<xs:documentation>Element used to specify pass-through Javascript</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:anyAttribute/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
Run Code Online (Sandbox Code Playgroud)
在我的文件中:
<html-attributes target="_new"/>
Run Code Online (Sandbox Code Playgroud)
当我验证时,我得到......
验证错误:cvc-complex-type.3.2.2:不允许在元素'html-attributes'中出现属性'target'.在文件:/ Users/benson/x/btweb/web_2_0 /./ content/about-us/about-us.xml第35行38
我错过了什么?
Fil*_*urt 10
可能错字?您的架构定义了<html-script>
文档使用的元素<html-attributes>
.
还可以尝试将processContents
指令添加到anyAttribute:
<xs:anyAttribute processContents="skip" />
Run Code Online (Sandbox Code Playgroud)
要么
<xs:anyAttribute processContents="lax" />
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1455 次 |
最近记录: |