Question

Attempting to parse this schema definition:

<xsd:element name="GameManifest" type="GameSystemManifest"/>

<xsd:complexType name="entry">
    <xsd:sequence>
        <xsd:element name="SystemName" type="xsd:string"></xsd:element>
        <xsd:element name="FileLocation" type= "xsd:string"></xsd:element>
    </xsd:sequence>
</xsd:complexType>

<xsd:complexType name="GameSystemManifest">
    <xsd:sequence>
        <xsd:element ref="entry"/> <--Error message says problem line is is here.
    </xsd:sequence>
</xsd:complexType>

</xsd:schema>

with XJC nets me this error:

src-resolve: Cannot resolve the name 'entry' to a(n) 'element declaration' component.

I've got no clue what is wrong here.

Edit: Solved this myself after I read this: http://alsdias.blogspot.com/2012/11/cannot-resolve-name-to-type-definition.html

I changed the definition of "GameSystemManifest" so that "entry" is defined inside of it.

Was it helpful?

Solution

you have to declare an element named entry. You have the complex type declared but not the element.

Declare:

<xsd:element name="entry" type="entry"/>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top