[xsd-users] KML schema namespace problem

Lane Wimberley techlane64 at gmail.com
Fri Dec 7 12:07:37 EST 2007


I am new to this list, and new to XML schema and the Code Synthesis tools,
so please forgive me if this question is inappropriate or seems silly.

I am really impressed with the xsd tools.  So far, I've had great success
with compiling my own schemata.  But, recently I wanted to see if I could
compile Google's KML schema (
http://code.google.com/apis/kml/schema/kml21.xsd).

Initially, I tried ...

$ xsd cxx-tree --generate-polymorphic --root-element kml kml21.xsd

But, this produces ...

kml21.xsd:7:37: error: unable to map XML Schema namespace '
http://earth.google.com/kml/2.1' to C++ namespace
kml21.xsd:7:37: info: use the --namespace-map or --namespace-regex option to
provide custom mapping

On a whim, I attempted ...

xsd cxx-tree --generate-polymorphic --root-element --namespace-regex
http://earth.google.com/kml/2.1=foo::bar kml kml21.xsd

...and the result was...

http://earth.google.com/kml/2.1=foo::bar: error: '
http://earth.google.com/kml/2.1=foo::bar': unable to open in read mode

As I indicated, I'll be the first to admit that I know next to nothing about
how namespaces work.  I've been reading the XML schema documentation in an
attempt to educate myself about namespaces and what this problem might be,
but to no avail.  Any clues about how to resolve this problem MUCH
appreciated!

-Lane Wimberley
Zebra Imaging
Austin, TX



More information about the xsd-users mailing list