|
Re: disable code generation for certain parts of XML Schema? [message #426101 is a reply to message #426097] |
Tue, 16 December 2008 10:56 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Matthias,
Comments below.
Matthias wrote:
> Hello,
>
> we are using EMF to parse XML files based on several XML schemas. In
> our schema, we have this complexType:
>
> <xsd:schema ... xmlns:x="... other namespace defined by
> third-party schema ... "
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore">
>
> <xsd:complexType name="conditionType" ecore:featureMap="myCond">
> <xsd:sequence minOccurs="1" maxOccurs="1">
> <xsd:element ref="x:external" />
> </xsd:sequence>
> </xsd:complexType>
>
> It refers to "m:external" which is defined by a third-party XML
> schema. In our application, we would like to work with the
> conditionType by using a general FeatureMap. We do not want to use EMF
> model code classes for the content in the third-party schema.
>
> Is it possible to disable the generation of model code for the
> third-party schema, starting at x:external)?
No. You could replace the element with a wildcard, <xsd:any
namespace="<third-party-namespace>"/> but that would allow any element
from that other namespace. Or you could define a schema with the third
party namespace where you just have <xsd:element name="external"/> and
nothing else, which would produce a minimal package for that namespace...
> Regards,
> Matthias
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03890 seconds