I am trying to create JAXB project. I have a schema file for a XML. I am getting several errors in the schema (xsd) file because of the way the xml structure.
One of my xml file elemnets is as follows.
<m:properties>
<d:Id m:type="Edm.Int32">19</d:Id>
</m:properties>
and corresponding xsd is as follows.
<xs:element name="m:properties">
<xs:complexType>
<xs:sequence>
<xs:element name="d:Id" type="xs:int">
<xs:complexType>
<xs:attribute name="m:type" type="xs:string"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
Now since, this the tag/attribute names contain ":", I get following errors. And I am not able to compile my code.
Multiple annotations found at this line:
- s4s-elt-invalid-content.1: The content of '#AnonType_d:UserIdm:propertiescontententryfeed' is invalid.
Element 'attribute' is invalid, misplaced, or occurs too often.
- s4s-att-invalid-value: Invalid attribute value for 'name' in element 'attribute'. Recorded reason: cvc-
datatype-valid.1.2.1: 'm:type' is not a valid value for 'NCName'.
- src-attribute.3.1: One of 'ref' or 'name' must be present in a local attribute declaration.
Can some one help me here.
Thanks