Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [Xpand] Root element not found
[Xpand] Root element not found [message #643365] Mon, 06 December 2010 16:31 Go to next message
Stefan Jurack is currently offline Stefan JurackFriend
Messages: 24
Registered: February 2010
Junior Member
Hi,

I have a question according to Xpand and I guess this is the right location for that, next to Xtext?!

I have a grammar with top-level element "WebsiteModel":
...
WebsiteModel:
'site' title=STRING
pages+=WebPage+
...

When I try to generate code out of an instanz of my grammar with a workflow configuration as follows (excerpt)...:
load = {
slot = "websiteRoot"
type = "WebsiteModel"
}

...the console output is telling me, that no element of that type has been found. However, when I use a non-top-level element (e.g. WebPage) in the workflow configuration, the result set is not empty as expected.

Is there a certain trick I missed to access the root element in order to perform Xpand transformations?

Thnx,
Stefan

PS: Well, this question seems to be better off in the M2T forum. @Admin: Don't mind to delete this post. I put a duplicate in the M2T forum.

[Updated on: Mon, 06 December 2010 19:14]

Report message to a moderator

Re: [Xpand] Root element not found [message #643493 is a reply to message #643365] Tue, 07 December 2010 06:51 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

the reader only "exports" Elements that have a QualifiedName to the Xpand generator component. so use a IQualifiedNameProvider tp give your WebsiteModel a name.

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [Xpand] Root element not found [message #643499 is a reply to message #643493] Tue, 07 December 2010 07:08 Go to previous message
Stefan Jurack is currently offline Stefan JurackFriend
Messages: 24
Registered: February 2010
Junior Member
Hi Christian,

thnx for the hint!

According to that I played around a bit and found that changing WebsiteModel's "title=STRING" to "name=STRING" in my grammar is qualified enough for the reader Wink

...
WebsiteModel:
'site' name=STRING
pages+=WebPage+
...

Thanks a lot! This problem nearly drove me mad.

Stefan
Previous Topic:optional rule with enum saves incorrectly from EMF.
Next Topic:Invoke validation programmatically
Goto Forum:
  


Current Time: Sat Apr 20 00:35:06 GMT 2024

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

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

Back to the top