XML スキーマに問題があります。XML ファイルに HTML コードを挿入する必要があり、xs:any が役立つことがわかりました。しかし、xmllint は次のようなエラーを返します。
example.xml:4: element h1: Schemas validity error : Element 'h1': This element is not expected. Expected is ( {http://www.w3.org/1999/xhtml}* ).
XML:
<?xml version="1.0" encoding="UTF-8"?>
<foo>
<bar>
<h1>Lorem ipsum</h1>
</bar>
</foo>
スキーマ:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="foo">
<xs:complexType>
<xs:sequence>
<xs:element name="bar" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:any namespace="http://www.w3.org/1999/xhtml" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
私は何を間違っていますか?