Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Probblem with XSD generated model editor
Probblem with XSD generated model editor [message #598278] Tue, 27 June 2006 16:27
Daniel Mahler is currently offline Daniel MahlerFriend
Messages: 53
Registered: July 2009
Member
I have an XSD which contains the following.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
<xs:element name="triple" substitutionGroup="rng:pattern">
<xs:complexType>
<xs:sequence>
<xs:element ref="ccs:term-exp"/>
<xs:element ref="ccs:term-exp"/>
<xs:element ref="ccs:term-exp"/>
</xs:sequence>
<xs:attribute name="row"/>
</xs:complexType>
</xs:element>

<xs:element name="term-exp" abstract="true"/>
<xs:element name="var" substitutionGroup="ccs:term-exp" type="xs:NCName"/>
<xs:element name="term" substitutionGroup="ccs:term-exp"
type="xs:anyURI"/>
<xs:element name="literal" substitutionGroup="ccs:term-exp"
type="xs:string"/>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++

I have created an EMF plugin from it in the textbook way.
However, when I use the generated model editor,
it tries to force each of the three children of triple to be a different
type (var/term/literal).
If I make the first child <term>, then the Term Type option is greyed out in
the menu for the next child.

If I edit a model in the text editor:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++
<?xml version="1.0" encoding="UTF-8"?>
<ccs:triple xmlns:ccs="http://www.rightscom.com/ns/ccs">
<ccs:term>a</ccs:term>
<ccs:term>b</ccs:term>
<ccs:term>c</ccs:term>
</ccs:triple>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++

and then open it with the model editor
then I only see (with folding fully expanded)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++
* platform ...

* Document Root

* <triple> Triple Type

* <term> c
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++

and I do not seem to be able to get at the

<ccs:term>b</ccs:term>
<ccs:term>c</ccs:term>

components

I do not understand why the model editor wants to make the childerent
distinct.
To my best understanding the schema does not imply the constraint.

thanks
Daniel
Previous Topic:Schema - Versoin Control
Next Topic:model editor appearance customization
Goto Forum:
  


Current Time: Sat Apr 20 00:16:00 GMT 2024

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

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

Back to the top