[xsd-users] Namespace mapping for XML schema error...
Boris Kolpackov
boris at codesynthesis.com
Wed Mar 3 05:58:03 EST 2010
Hi Pushkar,
Pushkar Kolhe <robotpushkar at gmail.com> writes:
> I get an error saying Cannot map XML schema namespace 'urn:OffLineMessage'
> to C++ namespace. I tried to add --namespace-map with:
> xsd.exe cxx-tree --anonymous-regex "#.* (.+)/(.+)#$1_$2#" --namespace-map
> "http://www.w3.org/2000/09/xmldsig#=XMLDSig" file.xsd
>
> I get the same error again!
You will need to pass the namespace that is used in your schema
(urn:OffLineMessage) instead of some unrelated namespace
(http://www.w3.org/2000/09/xmldsig#) to the --namespace-map option.
In other words, replace:
--namespace-map "http://www.w3.org/2000/09/xmldsig#=XMLDSig"
With something like:
--namespace-map urn:OffLineMessage=OffLineMessage
Alternatively, you can download[1] the beta for the next release of XSD
(3.3.0) which is capable of mapping URN-style namespace automatically.
[1] http://www.codesynthesis.com/products/xsd/download.xhtml
Boris
More information about the xsd-users
mailing list