Hi,
Thanks for the reply that looks like a clean solution. But what if I can't
edit the schema, can this be done in an external binding file?
Thanks,
Pavel Bucek wrote:
>
> Hello,
>
> if you can edit schema, try something like this:
>
> <xs:complexType name="abstrClass" abstract="true">
> <xs:sequence>
> <xs:element name="field1" type="xs:int" />
> <xs:element name="field2" type="xs:int" />
> </xs:sequence>
> </xs:complexType>
>
> and
>
> public abstract class AbstrClass { .. }
>
> will be generated.
>
>
> Pavel
>
>
> alisamad wrote:
>> Hi I have posted this question somewhere, so I am gonna try here as well.
>>
>> I have a schema file and I would like to generate a class which would be
>> an
>> abstract class
>> i.e the generated class would look like this:
>>
>> public abstract class MyClass {
>> .....
>> }
>>
>> Can it be done with an annotation or with an external binding file?
>>
>> many thanks,
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: dev-help_at_jaxb.dev.java.net
>
>
>
--
View this message in context: http://www.nabble.com/How-to-generate-an-abstract-class-with-JAXB--tp20688552p20697054.html
Sent from the java.net - jaxb dev mailing list archive at Nabble.com.