Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » The xs:element with a ref attribute does not show the link
The xs:element with a ref attribute does not show the link [message #68589] Wed, 12 July 2006 01:22 Go to next message
Eclipse User
Originally posted by: kannan.ekanath.gmail.com

Hi All,
Please excuse the cross post as I am not sure if this is something with
XSD itself.

I have an XSD (again attaching a Writer, Book example XSD) where a
Writer has Books like,

<xsd:complexType name="Writer">
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="Book"/>
</xsd:sequence>
</xsd:complexType>

I declare Book as an element and not directly as a complex type. Now the
editor code comes up fine. However when i try to create the
"GMFGraphical model", Writer and Book come as node. *But the link
between them is not coming up in the wizard*. I am not able to add it
manually after gmfgraph creation. My questions are

a) Why does the linking part not come up in GMFGraph wizard, even though
a Writer class has a reference to the BookType in the ecore model?

b) Can someone point to relevant documentation as to what a ref actually
means? I have gone through
(http://www.w3schools.com/schema/schema_complex.asp) and
(http://www.w3schools.com/schema/el_element.asp)
But doesnt give me what is the difference between having it as a ref
instead of type attribute?

Thanks,
Kannan
Re: The xs:element with a ref attribute does not show the link [message #68598 is a reply to message #68589] Wed, 12 July 2006 03:17 Go to previous messageGo to next message
Eclipse User
Originally posted by: kannan.ekanath.gmail.com

I even added
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="Book"
ecore:reference="Book"/> in the writer assuming ecore:reference will
bring up the link in the graphical editor


Kannan Ekanath wrote:
> Hi All,
> Please excuse the cross post as I am not sure if this is something with
> XSD itself.
>
> I have an XSD (again attaching a Writer, Book example XSD) where a
> Writer has Books like,
>
> <xsd:complexType name="Writer">
> <xsd:sequence>
> <xsd:element name="name" type="xsd:string"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="Book"/>
> </xsd:sequence>
> </xsd:complexType>
>
> I declare Book as an element and not directly as a complex type. Now the
> editor code comes up fine. However when i try to create the
> "GMFGraphical model", Writer and Book come as node. *But the link
> between them is not coming up in the wizard*. I am not able to add it
> manually after gmfgraph creation. My questions are
>
> a) Why does the linking part not come up in GMFGraph wizard, even though
> a Writer class has a reference to the BookType in the ecore model?
>
> b) Can someone point to relevant documentation as to what a ref actually
> means? I have gone through
> (http://www.w3schools.com/schema/schema_complex.asp) and
> (http://www.w3schools.com/schema/el_element.asp)
> But doesnt give me what is the difference between having it as a ref
> instead of type attribute?
>
> Thanks,
> Kannan
Re: The xs:element with a ref attribute does not show the link [message #68604 is a reply to message #68598] Wed, 12 July 2006 08:54 Go to previous message
Eclipse User
Originally posted by: merks.ca.ibm.com

Kannan,

You're sure your overall schema is valid? Whether you have a local
element declaration or a ref to a global element declaration should have
no significant impact on the resulting Ecore model (other than the fact
that, by default, the former would be unqualified in the serialization
while the later would be qualified). I don't know enough about GMF to
answer that part of the question...


Kannan Ekanath wrote:

> I even added
> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="Book"
> ecore:reference="Book"/> in the writer assuming ecore:reference will
> bring up the link in the graphical editor
>
>
> Kannan Ekanath wrote:
>
>> Hi All,
>> Please excuse the cross post as I am not sure if this is something
>> with XSD itself.
>>
>> I have an XSD (again attaching a Writer, Book example XSD) where a
>> Writer has Books like,
>>
>> <xsd:complexType name="Writer">
>> <xsd:sequence>
>> <xsd:element name="name" type="xsd:string"/>
>> <xsd:element maxOccurs="unbounded" minOccurs="0"
>> ref="Book"/>
>> </xsd:sequence>
>> </xsd:complexType>
>>
>> I declare Book as an element and not directly as a complex type. Now
>> the editor code comes up fine. However when i try to create the
>> "GMFGraphical model", Writer and Book come as node. *But the link
>> between them is not coming up in the wizard*. I am not able to add it
>> manually after gmfgraph creation. My questions are
>>
>> a) Why does the linking part not come up in GMFGraph wizard, even
>> though a Writer class has a reference to the BookType in the ecore
>> model?
>>
>> b) Can someone point to relevant documentation as to what a ref
>> actually means? I have gone through
>> (http://www.w3schools.com/schema/schema_complex.asp) and
>> (http://www.w3schools.com/schema/el_element.asp)
>> But doesnt give me what is the difference between having it as a ref
>> instead of type attribute?
>>
>> Thanks,
>> Kannan
>
Previous Topic:XSD features restricting base class
Next Topic:Why cant an extended type add an attribute
Goto Forum:
  


Current Time: Thu Jul 31 01:30:00 EDT 2014

Powered by FUDForum. Page generated in 0.05895 seconds