[xsd-users] Customizing Types problem
Bradley Beddoes
beddoes at intient.com
Thu Mar 15 05:53:39 EDT 2007
Hi Boris and Ray,
You will both have to forgive me I had tried this originally and it
compiled both schema hence changing creating the dual custom types.
I have just tried this again now and it works fine, obviously last night
I was running a different command which I thought was this :(.
I appreciate the help from both of you, thanks very much.
regards,
Bradley
Boris Kolpackov wrote:
> Hi Bradley,
>
> Bradley Beddoes <beddoes at intient.com> writes:
>
>> Yes but in this instance one relies on components from the other so
>> both must be supplied unfortunately.
>
> I think Ray's suggestion should work. If one relies on the other then
> there must be an import statement. The --custom-type option only
> affects the target namespace of the schema being compiled. For
> example, if you have schema foo.xsd and bar.xsd. foo.xsd imports
> bar.xsd. Both of them define say, my_type. If you do:
>
> $ xsd cxx-tree --custom-type my_type foo.xsd
> $ xsd cxx-tree bar.xsd
>
> Then you will have my_type in foo.xsd customized while in bar.xsd
> you will have the original generated type. Moving --custom-type
> from foo.xsd to bar.xsd should also work.
>
>
> hth,
> -boris
--
Bradley Beddoes
Lead Software Architect
http://intient.com
Intient - "Open Source, Open Standards"
More information about the xsd-users
mailing list