Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Extend the XML of SSE or Write a new one?
Extend the XML of SSE or Write a new one? [message #485025] Thu, 10 September 2009 05:43 Go to next message
Khoa Nguyen is currently offline Khoa Nguyen
Messages: 4
Registered: July 2009
Junior Member
Hi all,

I'm going to write a new structured text editor for a programming
language which is based on XML:
- It is XML but it doesn't have to be well-formed. Unescaped characters
(<, >, &...) may appear at any place!!!
- It doesn't contain meta entries such as DTD, Schema...

After doing some research, I found that the SSE in WST would be a good
starting point for this kind of editor. However, if I implement this
editor by extending XML/SSE editor via extension points, I will have to
modify some of features of XML/SSE which seems to be very intricate:
- Remove several actions (e.g: Add DTD..) in the outline-view.
- The validation should be rewritten to allow unescaped characters.
- Remove some inapplicable suggestions from content assists.
- ...

Sadly, although SSE/WST has been around for several years, the documents
(programmer's guide) are only partial. I don't know if those
modifications could be done with the current XML/SSE editor? Or if it is
so complicated, should I write a new editor which extends SSE directly
and use XML/SSE partially?

Any comments are appreciated.

Thanks,
Khoa Nguyen
Re: Extend the XML of SSE or Write a new one? [message #485219 is a reply to message #485025] Thu, 10 September 2009 15:55 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2238
Registered: July 2009
Senior Member
Khoa Nguyen wrote:
> I'm going to write a new structured text editor for a programming
> language which is based on XML:
> - It is XML but it doesn't have to be well-formed. Unescaped characters
> (<, >, &...) may appear at any place!!!
> - It doesn't contain meta entries such as DTD, Schema...
>
> After doing some research, I found that the SSE in WST would be a good
> starting point for this kind of editor. However, if I implement this
> editor by extending XML/SSE editor via extension points, I will have to
> modify some of features of XML/SSE which seems to be very intricate:
> - Remove several actions (e.g: Add DTD..) in the outline-view.
> - The validation should be rewritten to allow unescaped characters.
> - Remove some inapplicable suggestions from content assists.
> - ...
>
> Sadly, although SSE/WST has been around for several years, the documents
> (programmer's guide) are only partial. I don't know if those
> modifications could be done with the current XML/SSE editor? Or if it is
> so complicated, should I write a new editor which extends SSE directly
> and use XML/SSE partially?
>
> Any comments are appreciated.

It's a tricky thing to support (instead of just tolerating) a
variant of the regular syntax, enough that it might warrant a new
implementation (or a modified version of the existing one). Even
the un-escaped characters would be an issue as our XML parser relies
on the '<' to tell it when a tag is beginning, and our batch
validator, as a wrapper around Xerces, would have to be rewritten.
Additionally most of the UI in Eclipse is written for contributions,
not for removals.

Is it something that can't have references to a DTD or XML Schema?
Is it actually more like HTML, then?

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: Extend the XML of SSE or Write a new one? [message #485263 is a reply to message #485219] Thu, 10 September 2009 22:11 Go to previous messageGo to next message
Khoa Nguyen is currently offline Khoa Nguyen
Messages: 4
Registered: July 2009
Junior Member
Nitin Dahyabhai wrote:
> Khoa Nguyen wrote:
>> I'm going to write a new structured text editor for a programming
>> language which is based on XML:
>> - It is XML but it doesn't have to be well-formed. Unescaped
>> characters (<, >, &...) may appear at any place!!!
>> - It doesn't contain meta entries such as DTD, Schema...
>>
>> After doing some research, I found that the SSE in WST would be a good
>> starting point for this kind of editor. However, if I implement this
>> editor by extending XML/SSE editor via extension points, I will have
>> to modify some of features of XML/SSE which seems to be very intricate:
>> - Remove several actions (e.g: Add DTD..) in the outline-view.
>> - The validation should be rewritten to allow unescaped characters.
>> - Remove some inapplicable suggestions from content assists.
>> - ...
>>
>> Sadly, although SSE/WST has been around for several years, the
>> documents (programmer's guide) are only partial. I don't know if those
>> modifications could be done with the current XML/SSE editor? Or if it
>> is so complicated, should I write a new editor which extends SSE
>> directly and use XML/SSE partially?
>>
>> Any comments are appreciated.
>
> It's a tricky thing to support (instead of just tolerating) a variant of
> the regular syntax, enough that it might warrant a new implementation
> (or a modified version of the existing one). Even the un-escaped
> characters would be an issue as our XML parser relies on the '<' to tell
> it when a tag is beginning, and our batch validator, as a wrapper around
> Xerces, would have to be rewritten. Additionally most of the UI in
> Eclipse is written for contributions, not for removals.
>
> Is it something that can't have references to a DTD or XML Schema? Is it
> actually more like HTML, then?
>
Thanks for your reply.

Actually, I failed to convince my supervisor to keep the language as
clean & well-formed as an XML document should be. That's why everything
is now getting harder and harder.

Yes, you're right. It is more like HTML and I'm reusing HTML/SSE by
cloning/modify its source code although it's a bad practice in software
development :(

BTW, do you know how much effort if I follow the above way? Or are there
any better ways to achieve the same result?

Thanks in advance.

Khoa Nguyen
Re: Extend the XML of SSE or Write a new one? [message #487334 is a reply to message #485263] Tue, 22 September 2009 15:14 Go to previous message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2238
Registered: July 2009
Senior Member
Khoa Nguyen wrote:
> BTW, do you know how much effort if I follow the above way? Or are there
> any better ways to achieve the same result?

It depends on how close the language you're trying to support is to
one we've already implemented. Minor tweaks to the parser and
reparser that don't require changing how the DOM is built would be
comparatively easy; the tokenizer we use is for that one is pretty
straightforward. If the syntax is radically different or the
structured model can't be represented using our existing DOM, it
will require a much larger effort.

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


---
Nitin Dahyabhai
Eclipse WTP, IBM
Previous Topic:Problem deploying plugin I wrote myself.
Next Topic:HTML text typing undo lets view jump
Goto Forum:
  


Current Time: Sat Aug 02 00:38:51 EDT 2014

Powered by FUDForum. Page generated in 0.02522 seconds