Item 2 of 53 Previous | Next

2
Vote

Adjust Casing breaks elementnames with a dash

description

If I've got the following schema
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="a-t">
<xs:complexType>
<xs:sequence>
<xs:element name="b1nodash" type="xs:boolean"/>
<xs:element name="b1-dash" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

then generated sourcefiles have xmlroot/xmlelement attributes where the name is defined without the dash (i.e. [XmlRoot(Name="at")]. See the attached source file.

Also: I would have expected that the b1-dash element would translate to the class property B1Dash, but B1dash is generated.

comments

rjvdboon wrote Jan 19 at 7:33 AM

I've submitted patch 11285 to remedy the problem. Hope to see it in the official distribution soon;-)