T
Tjerk Wolterink
I have an schema, like this one:
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:x="http://www.wolterinkwebdesign.com/xml/model"
xmlns="http://www.wolterinkwebdesign.com/xml/structure"
targetNamespace="http://www.wolterinkwebdesign.com/xml/structure"
version="1.0">
<xsd:element name="structure">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="metadata"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="title" type="xsd:string"/>
<xsd:element name="author" type="xsd:string"/>
<xsd:element name="keywords" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
and a document like this one:
<structure
xmlns="http://www.wolterinkwebdesign.com/xml/structure"
xmlns:x="http://www.wolterinkwebdesign.com/xml/model"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.wolterinkwebdesign.com/xml/structure
../schemas/structure.xsd">
<metadata>
<title>XCM Test</title>
<author>Tjerk Wolterink</author>
<keywords>xcm test</keywords>
</metadata>
</structure>
When i try to validate i get this:
Xerces Java 2 Validation Starting.
file:///d:/development/webapps/XCManager/web/WEB-INF/structure.xml:18,10:
(Error) cvc-complex-type.2.4.a: Invalid content starting with element
'title'. One of '{"":title}' is expected.
huh title is in the namespace of /xml/structure
file:///d:/development/webapps/XCManager/web/WEB-INF/structure.xml:41,11:
(Error) cvc-complex-type.2.4.a: Invalid content starting with element
'title'. One of '{"":title}' is expected.
Xerces Java 2 Validation Complete.
help me
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:x="http://www.wolterinkwebdesign.com/xml/model"
xmlns="http://www.wolterinkwebdesign.com/xml/structure"
targetNamespace="http://www.wolterinkwebdesign.com/xml/structure"
version="1.0">
<xsd:element name="structure">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="metadata"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="title" type="xsd:string"/>
<xsd:element name="author" type="xsd:string"/>
<xsd:element name="keywords" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
and a document like this one:
<structure
xmlns="http://www.wolterinkwebdesign.com/xml/structure"
xmlns:x="http://www.wolterinkwebdesign.com/xml/model"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.wolterinkwebdesign.com/xml/structure
../schemas/structure.xsd">
<metadata>
<title>XCM Test</title>
<author>Tjerk Wolterink</author>
<keywords>xcm test</keywords>
</metadata>
</structure>
When i try to validate i get this:
Xerces Java 2 Validation Starting.
file:///d:/development/webapps/XCManager/web/WEB-INF/structure.xml:18,10:
(Error) cvc-complex-type.2.4.a: Invalid content starting with element
'title'. One of '{"":title}' is expected.
huh title is in the namespace of /xml/structure
file:///d:/development/webapps/XCManager/web/WEB-INF/structure.xml:41,11:
(Error) cvc-complex-type.2.4.a: Invalid content starting with element
'title'. One of '{"":title}' is expected.
Xerces Java 2 Validation Complete.
help me