Martin,

Martin S. Weber wrote:
> Quoting "Werner Guttmann" <[EMAIL PROTECTED]>:
>> (...)
>> Okay, before having a go at this, let's get focused a bit. There's
>> already a work-around for this, as documented here:
>>
>> http://castor.org/reference/html/xml.code.generator.html#d0e4989
> Okay, I tried to verify that everything will be fine with that. But..
> that's just a great example of how your docco drives me nuts :)
> 
> Read this:
> 
> "3.4.1.9. <enumBinding> element
> 
> <enumBinding>
>    (enumDef)
> </enumBinding>
> 
> <enumDef>
>    (enumClassName = xsd:string, enumMember*)
> </enumDef>
> 
> <enumMember>
>    (name = xsd:string, value = xsd:string)
> </enumMember>"
> 
> and compare to the example:
> 
> "<enumBinding name="/enumType:durationUnitType">
>   <enum-def>
>     <enumMember>
>       <value>M</value>
>       <javaName>CUSTOM_M</javaName>
>     </enumMember>
>   </enum-def>
> </enumBinding>"
> 
> Spot the difference in the 'enum-def' vs 'enumDef' element name? Also
> enum-def is the only element on the whole tree that is not following
> java naming conventions applied to xml elements so the first stab of
> course is to use enumDef (which is wrong. enum-def helps me. To be
> consistent, it should be enumDef though imo).
Yes, it should. Happily awaiting a patch being attached to a (new) Jira
issue .. ;-). And I think that one should actually replace all those
BNF-style grammars with proper XML schema fragments.

On a more general note: please feel free to convince my peer committers
that a software developer (even in the OS context) is meant to be
writing documentation as well .. ;-).

> Anyways: once I name the enumtype (it is anonymous in the schema I have
> to work with), I can resolve the name clash manually by specifying the
> binding. 
That's what I hoped for ....
> I do not get to match the enumBinding to the anonymous
> simpleType that is sitting there in the bang.xsd which I've appended to
> JIRA (both "/bang/@prefix/enumType" and "/bang/@prefix/enumType:"
> wouldn't work). Is there a way to match anonymous types? (if not that's
> not a show-stopper as that's a change 'under the hood' I just can do).
Yes, there is a patch out there that tried to introduce this feature to
the relevant places, but it broke existing code hard. If you do happen
to have an option to switch towards named simple types, I'd do that.

> Off to next test ...
Thanks, martin, appreciated.

> Regards,
> 
> -Martin
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>    http://xircles.codehaus.org/manage_email
> 
> 

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to