[xsd-users] Re: Adding namspaces
Matt Burnham
mwburn at mhpcc.hpc.mil
Tue Jul 11 13:09:13 EDT 2006
Boris ,
If I add the namespace to my test case (a simple event and embedded
schema) it works fine, when I use the actual CoT schema's I get the
errors.
I'm using the following to generate the cxx-tree:
xsd.exe cxx-tree --root-element event --morph-anonymous
--namespace-regex /.*/cot/ --generate-inline --generate-ostream
--generate-serialization cot_event.xsd
In order to get the namespace added:
1 - I can't enclode the regex with quotes
2 - The first expression can't have a space
3 - I still need the --root-element and --morph-anonymous for the root
event element
I'm compiling with Visual Studio 7.1.
I'm attaching a zip file containing the generated class along with the
build log file.
I'll also download and try 2.2.0
Thanks,
Matt
Boris Kolpackov wrote:
Hi Matt,
Matt Burnham [1]<mwburn at mhpcc.hpc.mil> writes:
When I use this to add a namespace, the namespace is added, but then
I get a lot of compiler errors when compiling the generated cxx file.
Hm, that's strange. I compiled CoT event.xsd with the following command
(using XSD 2.1.1):
$ xsd cxx-tree --namespace-regex '/.* /foo::bar/' event.xsd
The resulting event.cxx compiles fine for me with g++. Can you provide
exact steps to reproduce this error? Also note that if you have any
.xsd files including or importing event.xsd, you will need to pass
the --namespace-regex option above when you compile them.
I also tried the new 2.2.0:
$ xsd cxx-tree --namespace-map =foo::bar event.xsd
And it also works fine.
hth,
-boris
References
1. mailto:mwburn at mhpcc.hpc.mil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: error.zip
Type: application/octet-stream
Size: 13907 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20060711/c1b5db21/error.obj
More information about the xsd-users
mailing list