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
Extended XML support
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
xml syntax (or any SGML form)
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".
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
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
- BenjiSmith
- Posts: 49
- Joined: Fri Jan 16, 2004 9:37 pm
- Contact:
Hmmmmm.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.
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.