[xsd-users] Re: Adding namspaces

Boris Kolpackov boris at codesynthesis.com
Sat Jul 8 08:45:21 EDT 2006


Hi Matt,

Matt Burnham <mwburn at mhpcc.hpc.mil> writes:

> For are the CoT schemas that I technically don't control, the "root"
> elements have very generic names (event, request, etc.) that I'd like to
> protect again name collisions.  Is there anyway to add a namespace to
> the generated cxx-tree classes?  I've looked at the --namespace-map and
> "prologue/postlogue" options, but don't seem to see anyway to do it.  If
> needed, I would be willing to add an "xsn" to the schema if the
> --namespace-map would work, I just don't know were to add it.

In 2.1.1 you will need to use the following option:

--namespace-regex '/.* /foo::bar/'

Here change foo::bar to whatever C++ namespace you need. In the upcoming
2.2.0, you will be able to write

--namespace-map =foo::bar

hth,
-boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20060708/61caf174/attachment.pgp


More information about the xsd-users mailing list