Michael, not sure what the problem is. Maybe somebody else is capable of
providing you with a better and more helpful answer.
Werner
Michael Thome wrote:
> 'Fraid not. Seems to be a confusion between the implicit complexType
> between a and b. I'm not quite sure what it is actually doing - I
> stumbled across the solution somewhat by accident.
>
> Werner Guttmann wrote:
>> Just out of curiosity, would the following binding file work for you ?
>>
>> <elementBinding name="complexType:a/b">
>> <member name="b"
>> java-type="my.CompressedString"
>> handler="my.CompressedStringHandler"/>
>> </elementBinding>
>>
>> Thanks
>> Werner
>>
>> Michael Thome wrote:
>>
>>> The second example works, but from reading the documentation, I was
>>> expecting the first to work also - this suggests that either my mental
>>> model of how this is supposed to work is wrong or there is a bug in the
>>> codegen.
>>>
>>> Werner Guttmann wrote:
>>>
>>>> Michael,
>>>>
>>>> just reading your question, I am not clear whether you did get it to
>>>> work eventually (or not). In other words, do you still need help with
>>>> regards to the correct binding file syntax, or not ?
>>>>
>>>> Regards
>>>> Werner
>>>>
>>>> Michael Thome wrote:
>>>>
>>>>
>>>>> I'm confused about proper use of a binding file to generate code for
>>>>> nested elements. Simplified xsd:
>>>>>
>>>>> <xs:element name="a">
>>>>> <xs:complexType>
>>>>> <xs:sequence>
>>>>> <xs:element name="b" type="xs:string"/>
>>>>> </xs:sequence>
>>>>> </xs:complexType>
>>>>> </xs:element>
>>>>>
>>>>> What I want is a class that looks like:
>>>>>
>>>>> class A {
>>>>> my.CompressedString b;
>>>>> CompressedString getB() {}
>>>>> void setB(CompressedString x) {}
>>>>> }
>>>>>
>>>>> I thought I put the following in my binding file, but it is silently
>>>>> ignored:
>>>>>
>>>>> <elementBinding name="a/b">
>>>>> <member name="b"
>>>>> java-type="my.CompressedString"
>>>>> handler="my.CompressedStringHandler"/>
>>>>> </elementBinding>
>>>>>
>>>>> but what I need to do to get it to actually work is:
>>>>>
>>>>> <elementBinding name="a">
>>>>> <java-class name="A"/>
>>>>> <elementBinding name="b">
>>>>> <member name="b"
>>>>> java-type="my.CompressedString"
>>>>> handler="my.CompressedStringHandler"/>
>>>>> </elementBinding>
>>>>> </elementBinding>
>>>>>
>>>>> I presume that I'm missing something... wrong binding name syntax, maybe
>>>>> - suggestions?
>>>>>
>>>>> Thanks,
>>>>> Michael
>>>>>
>>>>> --
>>>>> *Michael Thome*
>>>>> BBN Technologies 10 Moulton St, Cambridge MA 02138 USA
>>>>> phone: +1 617 873 1853
>>>>>
>>>>> ------------------------------------------------- If you wish to
>>>>> unsubscribe from this list, please send an empty message to the
>>>>> following address: [EMAIL PROTECTED]
>>>>> -------------------------------------------------
>>>>>
>>>>>
>>>> -------------------------------------------------
>>>> If you wish to unsubscribe from this list, please
>>>> send an empty message to the following address:
>>>>
>>>> [EMAIL PROTECTED]
>>>> -------------------------------------------------
>>>>
>>>>
>>> --
>>> *Michael Thome*
>>> BBN Technologies 10 Moulton St, Cambridge MA 02138 USA
>>> phone: +1 617 873 1853
>>>
>>> ------------------------------------------------- If you wish to
>>> unsubscribe from this list, please send an empty message to the
>>> following address: [EMAIL PROTECTED]
>>> -------------------------------------------------
>>>
>>
>>
>> -------------------------------------------------
>> If you wish to unsubscribe from this list, please
>> send an empty message to the following address:
>>
>> [EMAIL PROTECTED]
>> -------------------------------------------------
>>
>
> --
> *Michael Thome*
> BBN Technologies 10 Moulton St, Cambridge MA 02138 USA
> phone: +1 617 873 1853
>
> ------------------------------------------------- If you wish to
> unsubscribe from this list, please send an empty message to the
> following address: [EMAIL PROTECTED]
> -------------------------------------------------
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------