[xsd-users] Problem to transform XML to C++

Roberto Cavalcante rmcavalcante at gmail.com
Mon May 3 05:04:36 EDT 2010


Hello everybody!


Firstly, I'd like to say I'm no XML expert and this is the first time I've
used XSD, so please be patient and forgive me in advance if I say something
senseless ;-)

I have some .XSDs files I need to convert to C++.
I've successfully configured the environment and ran the example.
However, when I tried to convert my .XSD, it complained that it cannot find
some external XSDs files; like for instance,
http://www.w3.org/2001/03/xml.xsd, among others.
So, after a look at xsd.xhtml, I've decided to download all XSDs one-by-one
because I could not identify a parameter that could allow xsd.exe to search
on web for external xsd files.
After all downloads, I used this command line:

xsd cxx-tree --location-map
http://www.w3.org/2001/03/xml.xsd=xml.xsd--location-map
http://dublincore.org/schemas/xmls/qdc/2008/02/11/dc.xsd=dc.xsd --location-map
http://www.w3.org/Math/XMLSchema/mathml2/mathml2.xsd=mathml2.xsd railML.xsd

I've got the following error message:
xsd cxx-tree --location-map
http://www.w3.org/2001/03/xml.xsd=xml.xsd--location-map
http://dublincore.org/schemas/xmls/qdc/2008/02/11/dc.xsd=dc.xsd --location-map
http://www.w3.org/Math/XMLSchema/mathml2/mathml2.xsd=mathml2.xsd railML.xsd
dc.xsd:72:53: warning F001: element 'title' is implicitly of anyType
dc.xsd:72:53: info: did you forget to specify 'type' attribute?
dc.xsd:73:55: warning F001: element 'creator' is implicitly of anyType
dc.xsd:73:55: info: did you forget to specify 'type' attribute?
dc.xsd:74:55: warning F001: element 'subject' is implicitly of anyType
dc.xsd:74:55: info: did you forget to specify 'type' attribute?
dc.xsd:75:59: warning F001: element 'description' is implicitly of anyType
dc.xsd:75:59: info: did you forget to specify 'type' attribute?
dc.xsd:76:57: warning F001: element 'publisher' is implicitly of anyType
dc.xsd:76:57: info: did you forget to specify 'type' attribute?
dc.xsd:77:59: warning F001: element 'contributor' is implicitly of anyType
dc.xsd:77:59: info: did you forget to specify 'type' attribute?
dc.xsd:78:52: warning F001: element 'date' is implicitly of anyType
dc.xsd:78:52: info: did you forget to specify 'type' attribute?
dc.xsd:79:52: warning F001: element 'type' is implicitly of anyType
dc.xsd:79:52: info: did you forget to specify 'type' attribute?
dc.xsd:80:54: warning F001: element 'format' is implicitly of anyType
dc.xsd:80:54: info: did you forget to specify 'type' attribute?
dc.xsd:81:58: warning F001: element 'identifier' is implicitly of anyType
dc.xsd:81:58: info: did you forget to specify 'type' attribute?
dc.xsd:82:54: warning F001: element 'source' is implicitly of anyType
dc.xsd:82:54: info: did you forget to specify 'type' attribute?
dc.xsd:83:56: warning F001: element 'language' is implicitly of anyType
dc.xsd:83:56: info: did you forget to specify 'type' attribute?
dc.xsd:84:56: warning F001: element 'relation' is implicitly of anyType
dc.xsd:84:56: info: did you forget to specify 'type' attribute?
dc.xsd:85:56: warning F001: element 'coverage' is implicitly of anyType
dc.xsd:85:56: info: did you forget to specify 'type' attribute?
dc.xsd:86:54: warning F001: element 'rights' is implicitly of anyType
dc.xsd:86:54: info: did you forget to specify 'type' attribute?
presentation\style.xsd:40:50: error: attribute name
'mstyle.attlist/linethickness' creates an unstable conflict when used as a
type name
presentation\layout.xsd:37:20: info: conflicting type is defined here
presentation\style.xsd:40:50: info: use --anonymous-regex to resolve this
conflict
presentation\style.xsd:40:50: info: and don't forget to pass the same option
when translating 'style.xsd' and all the schemas that refer to it
--------

As you can see, the XSD target is railML.xsd.
In case you wanna reproduce the "problem" you'll can find all files here
http://www.railml.org/2010/index.php/namespace-2009.html.
Additionally, you'll need other files because as I said before, xsd.exe
seems does not have an option/command/configuration to allow
external(internet) search.
I really don't know what this error message mean and how to create this
regex.
Any help you can provide in this regard is welcome.

Thanks in advance.

Roberto


More information about the xsd-users mailing list