i am new to jaxb and i am trying to unmarshal my first xsd scheme.
i get the following error message:
[ERROR] src-resolve: Cannot resolve the name 'NS0:noNamespaceSchemaLocation'
to a(n) 'attribute declaration' component.
line 10 of
file:/C:/Dokumente%20und%20Einstellungen/Micha/Eigene%20Dateien/Stammbaum/Stammbaum/xml/Stammbaum.xsd
[ERROR] s4s-elt-invalid-content.1: The content of '#AnonType_root' is
invalid. Element 'attribute' is invalid, misplaced, or occurs too often.
line 10 of
file:/C:/Dokumente%20und%20Einstellungen/Micha/Eigene%20Dateien/Stammbaum/Stammbaum/xml/Stammbaum.xsd
the beginning of my xsd file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
xmlns:NS0="http://www.w3.org/2001/XMLSchema-instance">
<xs:import namespace="http://www.w3.org/2001/XMLSchema-instance"
schemaLocation="NS0.xsd"/>
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element ref="Personen"/>
<xs:element ref="Partnerschaften"/>
</xs:sequence>
<xs:attribute ref="NS0:noNamespaceSchemaLocation" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="Personen">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="Person"/>
</xs:sequence>
</xs:complexType>
</xs:element>
can anyone please give me some advice what to do about this error message?
thanks for your help
Michael Beckenkamp
Michael Beckenkamp - 26 Oct 2006 22:13 GMT
Problem solved. I threw out several lines from the (Oxygen generated)
xsd-scheme and got it compiled. Sorry for bothering you, folks.