Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » The feature 'mixed' of **** with 2 element values must have exactly 1 element value
The feature 'mixed' of **** with 2 element values must have exactly 1 element value [message #530968] Mon, 03 May 2010 08:36 Go to next message
Jens Mising name is currently offline Jens Mising nameFriend
Messages: 12
Registered: March 2010
Location: Berlin
Junior Member
Hello,

I have an xsd which I used to generate model code using EMF (Eclipse 3.5 - EMF 2.5.0).
I can load and save XML files successfully but came across this message when I tried to implement the schema validation.

The xml file which I am trying to validate includes a comment like this:
<?xml version="1.0" encoding="ISO-8859-15"?>
<!-- here comes the comment... -->
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
...

Now, the comment generates the validation message (see title) but I don't really understand what it means.

I tried to google it to get an idea but only found code from buckminster which seems to simply exclude these type of error messages:
http:// dev.eclipse.org/viewsvn/index.cgi/branches/Platform-3.5.x/or g.eclipse.buckminster.aggregator.engine.maven/src/org/eclips e/buckminster/aggregator/engine/maven/POM.java?view=markup&a mp;root=Tools_BUCKMINSTER&pathrev=10975

I would appreciate if someone (with better knowledge on EMF than me - and that is obviously easy) could give me a pointer.
Re: The feature 'mixed' of **** with 2 element values must have exactly 1 element value [message #530982 is a reply to message #530968] Mon, 03 May 2010 09:14 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Jens,

This was fixed with bugzilla 295011. Comments at the root shouldn't
count as more than one root element...


Jens Helweg wrote:
> Hello,
> I have an xsd which I used to generate model code using EMF (Eclipse
> 3.5 - EMF 2.5.0). I can load and save XML files successfully but came
> across this message when I tried to implement the schema validation.
> The xml file which I am trying to validate includes a comment like
> this: <?xml version="1.0" encoding="ISO-8859-15"?>
> <!-- here comes the comment... -->
> <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> ..
>
> Now, the comment generates the validation message (see title) but I
> don't really understand what it means.
>
> I tried to google it to get an idea but only found code from
> buckminster which seems to simply exclude these type of error
> messages:
> http://dev.eclipse.org/viewsvn/index.cgi/branches/Platform-3 .5.x/org.eclipse.buckminster.aggregator.engine.maven/src/org /eclipse/buckminster/aggregator/engine/maven/POM.java?view=m arkup&root=Tools_BUCKMINSTER&pathrev=10975
>
>
> I would appreciate if someone (with better knowledge on EMF than me -
> and that is obviously easy) could give me a pointer.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: The feature 'mixed' of **** with 2 element values must have exactly 1 element value [message #530987 is a reply to message #530968] Mon, 03 May 2010 09:24 Go to previous messageGo to next message
Jens Mising name is currently offline Jens Mising nameFriend
Messages: 12
Registered: March 2010
Location: Berlin
Junior Member
I have searched for the error message in the source code and found that the root element of the xml file must apparently contain only one element.
At least the properties key "_UI_DocumentRootMustHaveOneElement_diagnostic" indicates this.

I guess the question remains: How do then allow comments in my xml file (at this position)?

Re: The feature 'mixed' of **** with 2 element values must have exactly 1 element value [message #530989 is a reply to message #530982] Mon, 03 May 2010 09:29 Go to previous message
Jens Mising name is currently offline Jens Mising nameFriend
Messages: 12
Registered: March 2010
Location: Berlin
Junior Member
Thanks Ed.
I guess I will try to update to 2.6 then.
Previous Topic:Linking different Models
Next Topic:ID Attribute Name
Goto Forum:
  


Current Time: Fri Apr 26 07:44:51 GMT 2024

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

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

Back to the top