[xsd-users] Need help: type-naming and function-naming issue

Boris Kolpackov boris at codesynthesis.com
Wed Oct 20 09:43:13 EDT 2010


Hi JW,

JW <jianwei.z at gmail.com> writes:

> I tried to name all class types and function names in java/ucc style but it
> didn't seem to work as I expected.
>
> [...] 
>
> Here were some class names and function names generated by the command:
> 
> Class Variable_condition;
> typedef ::Variable_condition Variable_conditionType;

With the predefined naming schemas ('java', 'lcc', etc), XSD only makes 
sure that the names it constructs (e.g., by adding the 'type' or 'iterator'
suffix) follow this conventions. It does not change the names that come
from the schema, assuming that the schema names already follow the desired 
convention.

In your case, I assume you have a schema type Variable_condition which
doesn't follow the 'ucc' style. If you want to also change the schema
names, then you will need to create your own regular expressions for
that. See the "NAMING CONVENTION" section in the XSD Compiler Command
Line Manual for more information on how to do this:

http://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml

Boris



More information about the xsd-users mailing list