Extended XML support

Ideas for new features

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
teknopaul
Posts: 2
Joined: Fri Feb 13, 2004 1:16 pm

Extended XML support

Post by teknopaul »

The syntax high-lighting definitions available for XML are at best patchy, this is because the base definitions assume html and keywords or C like syntax. XML syntax has very few keywords but the difference between elements and text is crucial.


In this day and age XML support is hardly a nice to have!!

p.s. what about a linux version? i might change desktop if textpad for linux was available :D
cacycle
Posts: 13
Joined: Thu Feb 12, 2004 12:17 pm

Post by cacycle »

A while ago I have been using TextPad under wine :)

But you are right, TextPad is one of the main reasons why I mostly use Windows...
User avatar
bloodbaz
Posts: 7
Joined: Thu Sep 11, 2003 11:03 pm

xml syntax (or any SGML form)

Post by bloodbaz »

I agree that native XML syntax highlighting is an essential feature to add. I currently differentiate Elements, Attributes etc... to CDATA by using > and < as comment delimiters but this seems "backwards". :P
User avatar
ramonsky
Posts: 88
Joined: Fri Nov 14, 2003 10:54 am

Post by ramonsky »

Agreed. Now how about this for a feature proposal...

For an XML file, why not get the list of keywords from the relevant DTD, which in turn may be obtained by parsing the start of the XML file.

So basically, it would go like this:
1. Parse the start of the XML file to discover the DTD(s) that define the keywords
2. If necessary, go online to get the DTD files
3. Parse the DTD files
4. Use this information to syntax color the xml file.

I agree that this represents a completely different algorithm to that currently used for syntax higlighting, but I think that XML requires a different algorithm. XML is not C, is not anything like C, so the "C=1" algorithm should maybe be augmented by a new "XML=1" algorithm.

Jill
User avatar
gracefool
Posts: 76
Joined: Thu Jan 29, 2004 7:21 am
Location: Wellington, New Zealand
Contact:

Post by gracefool »

Good idea, ramonsky. Can't see it happenin' for a few years tho, what with the seeming lack of XML parsers around...
User avatar
BenjiSmith
Posts: 49
Joined: Fri Jan 16, 2004 9:37 pm
Contact:

Post by BenjiSmith »

ramonsky wrote:For an XML file, why not get the list of keywords from the relevant DTD, which in turn may be obtained by parsing the start of the XML file.
Hmmmmm.

It may be possible to do this with an external command to parse the DTD and rewrite the syntax file.

Hmmmmmm.

I'll have to do some more thinking about that.
Post Reply