XML Meta Model [message #45217] |
Mon, 25 May 2009 07:17  |
Eclipse User |
|
|
|
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 02:53  |
Eclipse User |
|
|
|
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.
>
|
|
|
Powered by
FUDForum. Page generated in 0.23749 seconds