Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[emf-dev] Generating EMF from XSD Error

I have XSD files which I am trying to pull into
Eclipse to build a EMF model. These XSD files have
Version Number in the NMLNS, which I believe is used
to create the package names. 

I am attaching a sample XSD file which I am trying to
pull in.

The Code that is generated has the following package
structure


oasis/names/specification/ubl/schema/xsd/ChannelCode/_1/_0

The header of the XSD file is : 
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
   
xmlns="urn:oasis:names:specification:ubl:schema:xsd:ChannelCode-1.0"
   
xmlns:ccts="urn:oasis:names:specification:ubl:schema:xsd:CoreComponentParameters-1.0"
   
targetNamespace="urn:oasis:names:specification:ubl:schema:xsd:ChannelCode-1.0"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    version="1.0">


The Factory class and the Package Class has the names
_0Factory and _OPackage

When I do a generate All, the Corrosponding
ModelWizard
has the name _OModelWizard, and there is a error in
the generated Code because of the Name

protected _0Package _0Package = _0Package.eINSTANCE;

Cannot reference _OPackage before it is defined
(because of the naming)


My Question is,can it be possible

a) To drop the Version Numbers from during Generation
of Code (from the Package, Factory, Package Structure,
Model Wizard)

b) To Concatenate Version number with Class Name

c) Generate the Correct Names i.e.
ChannelCodeFactory
ChannelCodeModelWizard
ChannelCodePackage

Or am I missing something? 

regards
Rajesh
   

Attachment: UBL-CodeList-AllowanceChargeReasonCode-1.0.xsd
Description: UBL-CodeList-AllowanceChargeReasonCode-1.0.xsd


Back to the top