[xsde-users] add suffix to attribute getter/setter
Ivan Le Lann
ivan.lelann at free.fr
Tue Jun 5 11:47:42 EDT 2012
----- Mail original -----
> De: "Boris Kolpackov" <boris at codesynthesis.com>
> À: "Ivan Le Lann" <ivan.lelann at free.fr>
> Cc: xsde-users at codesynthesis.com
> Envoyé: Mercredi 30 Mai 2012 16:06:01
> Objet: Re: [xsde-users] add suffix to attribute getter/setter
>
> Hi Ivan,
>
> Ivan Le Lann <ivan.lelann at free.fr> writes:
>
> > Is there a way with XSDe/Hybrid to control generated getter/setter
> > method names for attributes ? (without changing the xsd attribute
> > name, obviously)
> >
> > <xs:complexType>
> > <xs:attribute name="Name" type="xs:string"/>
> > </xs:complexType>
> >
> > would give getter/setter "Name__attr" instead of "Name".
>
> No, there is currently no such mechanism. If the names of attributes
> in your schema are not used for any other constructs (e.g., type or
> element names), then you could achieve this using the --reserved-name
> option. For example:
>
> --reserved-name Name=Name__attr
>
> You could probably generate an options file with a list of these
> options for all of your attributes with a simple sed script.
>
Thanks for your answer, but that won't work in my case. Names do clash.
Anyway, this was only a nice feature to have, nothing necessary.
I'll forget it for now.
Regards,
Ivan
More information about the xsde-users
mailing list