Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » How to reference/use the XSD Ecore model
How to reference/use the XSD Ecore model [message #73706] Wed, 27 February 2008 01:27 Go to next message
Eclipse UserFriend
Originally posted by: j_h_zhu.yahoo.com

Hi, I am defining my Ecore model using schema definition. Within my Ecore
model, I'd like to reference/use the XSD Ecore model. To that end, I am
importing the namespace "http://www.eclipse.org/xsd/2002/XSD" and
corresponding schema definition. I was able to locate and use XSD.ecore
and XSD.genmodel to obtain XSD.xsd for this purpose.

My questions are:

1) Would this work?
2) Is XSD.xsd available somewhere so that there is no need to generate one?
3) Is there an alternative way to reference/use the XSD Ecore model from
within a schema based Ecore model?

Thanks,
Jianhua
Re: How to reference/use the XSD Ecore model [message #73742 is a reply to message #73706] Wed, 27 February 2008 12:46 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Jianhua,

This sounds very tricky. Within a .xsd, it's really XMLSchema.xsd you
should be importing to make use of XML Schema constructs in your model.
XSD.ecore is the hand-implemented model for XMLSchema.xsd but it wasn't
arrived at using the XSDEcoreBuilder as is used for other .xsd based
models. So you might indeed be better to export XSD.ecore to XSD.xsd
and refer to that. I haven't tried either and don't know what kind of
problems you're likely to encounter...


Jianhua wrote:
>
> Hi, I am defining my Ecore model using schema definition. Within my
> Ecore model, I'd like to reference/use the XSD Ecore model. To that
> end, I am importing the namespace
> "http://www.eclipse.org/xsd/2002/XSD" and corresponding schema
> definition. I was able to locate and use XSD.ecore and XSD.genmodel to
> obtain XSD.xsd for this purpose.
>
> My questions are:
>
> 1) Would this work?
> 2) Is XSD.xsd available somewhere so that there is no need to generate
> one?
> 3) Is there an alternative way to reference/use the XSD Ecore model
> from within a schema based Ecore model?
>
> Thanks,
> Jianhua
>
>
Re: How to reference/use the XSD Ecore model [message #602850 is a reply to message #73706] Wed, 27 February 2008 12:46 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 26215
Registered: July 2009
Senior Member
Jianhua,

This sounds very tricky. Within a .xsd, it's really XMLSchema.xsd you
should be importing to make use of XML Schema constructs in your model.
XSD.ecore is the hand-implemented model for XMLSchema.xsd but it wasn't
arrived at using the XSDEcoreBuilder as is used for other .xsd based
models. So you might indeed be better to export XSD.ecore to XSD.xsd
and refer to that. I haven't tried either and don't know what kind of
problems you're likely to encounter...


Jianhua wrote:
>
> Hi, I am defining my Ecore model using schema definition. Within my
> Ecore model, I'd like to reference/use the XSD Ecore model. To that
> end, I am importing the namespace
> "http://www.eclipse.org/xsd/2002/XSD" and corresponding schema
> definition. I was able to locate and use XSD.ecore and XSD.genmodel to
> obtain XSD.xsd for this purpose.
>
> My questions are:
>
> 1) Would this work?
> 2) Is XSD.xsd available somewhere so that there is no need to generate
> one?
> 3) Is there an alternative way to reference/use the XSD Ecore model
> from within a schema based Ecore model?
>
> Thanks,
> Jianhua
>
>
Previous Topic:[Announce] Eclipse/OMG Symposium at EclipseCon 2008
Next Topic:Create new DOM document from XSD schema
Goto Forum:
  


Current Time: Sun Nov 23 02:24:03 GMT 2014

Powered by FUDForum. Page generated in 0.01814 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software