Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » XML Meta Model
XML Meta Model [message #45217] Mon, 25 May 2009 11:17 Go to next message
Martin Novak is currently offline Martin NovakFriend
Messages: 4
Registered: July 2009
Junior Member
Hello,
I have some idea make XML editor with some extension with xtext.
I need use standard XML but with some additional rules for attribute value.
It is possible to do it this way?
Can I get some XML Meta model ,where and how can I use it?
Thanks a lot for your answer.
Re: XML Meta Model [message #45347 is a reply to message #45217] Tue, 26 May 2009 06:53 Go to previous message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
Do you have a generic XML editor in mind, or an XML-dialect, i.e. a
concrete language reusing XML's syntax?
Have you had a look at what WTP offers? They have an XML editor, which
is extendable.

If you want your own langauge with XML syntax, you should come up with
your own specific meta model. The easiest way, would be to let the meta
model be derived from your grammar.
An XML-like grammar could be written like so:

Element :
'<' name=ID (attributes+=Attribute)* '>'
(children+=Element)*
'</' closingName=ID '>'
|
'<' name=ID (attributes+=Attribute)* '/>';

Attribute :
name=ID '=' value=STRING;

Very basic and you'll have to validate that name == closingName in the
first alternative of Element.

Hope that helps,
Sven


Martin Novak schrieb:
> Hello,
> I have some idea make XML editor with some extension with xtext.
> I need use standard XML but with some additional rules for attribute value.
> It is possible to do it this way?
> Can I get some XML Meta model ,where and how can I use it?
> Thanks a lot for your answer.
>
Previous Topic:importing subpackages of external ecore models
Next Topic:[Announce] TMF XTEXT 0.7.0RC1 is available
Goto Forum:
  


Current Time: Sat Dec 21 16:39:34 GMT 2024

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

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

Back to the top