In my schema I have:
<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>
In a document I have:
<html-attributes target="_new"/>
When I validate, I get ...
Validation error: cvc-complex-type.3.2.2: Attribute 'target' is not allowed to appear in element 'html-attributes'. at file:/Users/benson/x/btweb/web_2_0/./content/about-us/about-us.xml line 35 character 38
What am I missing?
Possible Typo? Your schema defines the element <html-script>
whereas your document uses <html-attributes>
.
Also try adding the processContents
directive to your anyAttribute:
<xs:anyAttribute processContents="skip" />
or
<xs:anyAttribute processContents="lax" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With