I am using the following schema to parse GraphML XML files.
I managed to bind java classes from the schema (using xjc) and also unmarshaled a few example XML files.
Unfortunately, when I come to marshaling the XMLs I am getting the following error:
SchemaLocation: schemaLocation value = ‘Graphml.xsd’ must have even number of URI’s
As far as I can see the only schemaLocation use in the xsd is the following:
<xs:import namespace="http://www.w3.org/1999/xlink"
schemaLocation="http://graphml.graphdrawing.org/xmlns/1.0/xlink.xsd">
...
But I can’t see a problem in it.
Can someone suggest what is wrong ?
The schema fragment you show is syntactically correct; you are right not to find any problem there. The error message also doesn’t seem to be talking about the schema at
http://graphml.graphdrawing.org/xmlns/1.1/graphml-structure.xsd— it’s talking about something called GraphML.xsd.Without seeing the XML instance it’s hard to be sure, but perhaps in the document instance there is an attribute value specification of the form
xsi:schemaLocation = "GraphML.xsd"and a validator is complaining that the value “GraphML.xsd” needs instead to be a value containing an even number of URIs: namespace-name, schema-location pairs (as described in Blaise Doughan’s answer).