I have a wsdl that imports a schema I am trying to resolve xjc naming multiple nested MyElementName classes with the same name - which doesn\'t compile I have created this b
Your XPath:
//xsd:element[@name='AAA']
//xsd:sequence/xsd:element[@name='BBB']
//xsd:element[@name='MyElementName']
Seems to refer to both of your MyElementName elements since they're both under BBB. Try to get rid of //.
//xsd:element[@name='AAA']
/xsd:complexType
/xsd:sequence
/xsd:element[@name='BBB']
/xsd:complexType
/xsd:sequence
/xsd:element[@name='MyElementName']
I think this is the right direction you go. You have to customize your anonymous inner complex types.