This project is read-only.

More Control over casing (parameters)

Nov 23, 2011 at 7:36 PM
Edited Nov 23, 2011 at 7:45 PM


We started using a while ago and we came to realize that we miss some control over the casing of the generated code. The "Adjust Casing" option woks fine if the source XSD file uses a camelCasing convention. However our XSDs use a PascalCasing convention. Our main concern is with parameters. It looks like parameters are generated based on the casing of the XSD. Instead, we would like them to always be camel as this is the rule we follow (as pretty much everyone else I think).

Is this something that could be easily changed? I gave a look at the' source code and from what I've seen it looks like the parameter names are taken as-is from the XSD. The PascalCase decorator doesn't seem to be used for this anyway.

Below is an example

From this XSD
<xs:element name="findRequest"> 
<xs:element name="typeI" type="import:TypeIntervenant" /></xs:element> 
<xs:element name="NameS"> <xs:simpleType> <xs:restriction base="xs:string"/> </xs:simpleType> </xs:element>
The following code is generated:
Public Sub New(ByVal typeI As TypeIntervenantByVal NameS As String)
Dec 1, 2011 at 4:50 PM

Hi David,

Yes, camel casing is the normal convention for arguments and the recommendation in the design guidelines from Microsoft. Normally the argument names do end up being generated in camel case.

I don't know what would be causing this. It could be something with VB.NET or perhaps your schema. Do you get the same issue when generating in C#? Do you have a more complete example?



Dec 5, 2011 at 8:08 PM
Edited Dec 5, 2011 at 8:08 PM


I have the same behavior in C# and VB.NET. I have created an issue and attached sample project to it: Thus you will be able to use to see and reproduce the problem.

Best regards,