[xsde-users] add suffix to attribute getter/setter

Ivan Le Lann ivan.lelann at free.fr
Wed May 30 05:52:01 EDT 2012


Hi,

Is there a way with XSDe/Hybrid to control generated getter/setter method names for attributes ?
(without changing the xsd attribute name, obviously)

Example:
    <xs:complexType>
      <xs:attribute name="Name" type="xs:string"/>
    </xs:complexType>

would give getter/setter "Name__attr" instead of "Name".


Motivation:

I wrapped some XML generation code in macros so that I can either use XSDe 
or (e.g.) pugixml. But XSDe code does not depend on the child being 
an attribute or an element. XML_ADD_ELEM(parent,Name,"John") would work fine 
with XSDe but do something wrong at runtime with pugixml. 
I want to make this a compile time failure with XSDe.

Regards,
Ivan



More information about the xsde-users mailing list