[xsd-users] Receiving error using xsd on W3 PROV schema

Mohammad Khatami mdkhatami at gmail.com
Tue Apr 21 05:41:13 EDT 2015


Hi all,

I'm new to XML and for my project I need to XSD. I can use XSD tool for
simple XML schema but when I apply to the following w3 PROV schema I get
error.

XML schema:
http://www.w3.org/ns/prov-core.xsd

However I changed these two lines
<xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/"/>
  <xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
with
<xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/"
schemaLocation="xhtml-datatypes-1.xsd"/>
  <xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="xml.xsd"/>

and put XML.xsd and xhtml-datatypes-1.xsd in the same directory.

the by using this command I get the following error:

xsd cxx-tree --generate-serialization  prov-core.xsd

prov-core.xsd:478:55: warning F001: element 'internalElement' is implicitly
of anyType
prov-core.xsd:478:55: info: did you forget to specify 'type' attribute?
prov-core.xsd: warning T004: generating parsing and serialization functions
for 35 global elements
prov-core.xsd: info: use --root-element-* options to specify document
root(s)
prov-core.xsd:6:307: error: unable to map XML Schema namespace '
http://www.w3.org/ns/prov#' to C++ namespace
prov-core.xsd:6:307: info: use the --namespace-map or --namespace-regex
option to provide custom mapping

Howeverusing
xsd cxx-tree --generate-xml-schema --generate-serialization  prov-core.xsd
I get no error. Would you please help me how to solve it?

Thanks,
Mohammad


More information about the xsd-users mailing list