XSD validation fails on xsd:any
I have the following XML:
<a:aaa xmlns:a="aaa_ns">
<x/>
</a:aaa>
which is valid in relation to this XSD:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="aaa_ns" xmlns="http://www.w3.org/1999/XSL/Transform">
<xsd:element name="aaa">
<xsd:complexType>
<xsd:choice>
<xsd:any namespace="##other" processContents="skip" />
<xsd:any namespace="##local" processContents="skip" />
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
(##other allows any non-empty namespace different from targetNamespace, while ##local allows empty namespace.)
However, $xmllint --schema test.xsd test.xml
fails with
local complex type: The content model is not determinist.
Comments: I guess the error is signalled because of the two xsd:any elements, though their namespace attributes make them completely mutually orthogonal. I'm aware of no workaround for this XSD construction that would allow me to write it in another way, acceptable for xmllint.
Version:
$xmllint --version
...\\libxml2\xmllint.exe: using libxml version 20903
compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug Zlib