T
Tjerk Wolterink
I've a element definition like this:
--
<xs:element name="content">
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:any namespace="http://www.w3.org/1999/xhtml"/>
<xs:element ref="message"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
--
But when i validate the following xml:
--
<content>
<p xmlns="http://www.w3.org/1999/xhtml">
Welkom bij <b>Wolterink</b> Webdesign<br/>
</p>
</content>
--
I get the following error:
--
[Xerces-J 2.7.1] Validating "index.xml" against
"file:/D:/development/webapps/XCManager/web/WEB-INF/schemas/page.xsd" ...
Ln 8 Col 43 - cvc-complex-type.2.4.c: The matching wildcard is strict,
but no declaration can be found for element 'p'.
1 Errors
--
Ln 8 Col 43 is the following line:
<p xmlns="http://www.w3.org/1999/xhtml">
How can this be??
p is a element in the xhtml namespace so it is
valid for:
<xs:any namespace="http://www.w3.org/1999/xhtml"/>
What am i doing wrong?
--
<xs:element name="content">
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:any namespace="http://www.w3.org/1999/xhtml"/>
<xs:element ref="message"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
--
But when i validate the following xml:
--
<content>
<p xmlns="http://www.w3.org/1999/xhtml">
Welkom bij <b>Wolterink</b> Webdesign<br/>
</p>
</content>
--
I get the following error:
--
[Xerces-J 2.7.1] Validating "index.xml" against
"file:/D:/development/webapps/XCManager/web/WEB-INF/schemas/page.xsd" ...
Ln 8 Col 43 - cvc-complex-type.2.4.c: The matching wildcard is strict,
but no declaration can be found for element 'p'.
1 Errors
--
Ln 8 Col 43 is the following line:
<p xmlns="http://www.w3.org/1999/xhtml">
How can this be??
p is a element in the xhtml namespace so it is
valid for:
<xs:any namespace="http://www.w3.org/1999/xhtml"/>
What am i doing wrong?