I am using go-libxml2 for my xsd schema validation. I have an XML element which takes url as a value. My xsd also contains its type as anyURI as follows
<xs:element name="url" type="xs:anyURI">
The following code throws error on validation url which contains "[]"
xsd.schema.Validate(xml)
The following is the sample url which throws an error
<url>
<![CDATA[
http://example.com/orda/var[div]=super
]]>
</url>
Error:
'http://example.com/orda/var[div]=super is not a valid value of the atomic type 'xs:anyURI'
Regular urls are working fine. Any idea how to solve this issue