[TxMt] XML support?
justin.french at indent.com.au
Wed Nov 3 12:43:37 UTC 2004
On 03/11/2004, at 10:05 PM, David Casal wrote:
> I'm just wondering though, what happened to the existing XML bundle?
no idea... never saw it sorry.
> -the HTML bundle seems to underline each tag (why does it do that?)
It was just a styling that was started by David way back, and I picked
it up for the HTML bundle... It offers a nice visual cue as to what is
the tag, and what are the atts. Most certainly you could edit this
styling out of the bundle.
> -however, it underlines the namespace, not the tag itself, when a
> namespace is used. For example, <map:components> will get 'map'
> highlighted but not components.
OK, will make sure this is in the XML bundle... currently trying to
find out if it's part of XHTML or HTML... or perhaps we'll add it
anyway, because there are many XML-like templating languages that are
embedded in HTML which use them, like Textpattern (<txp:foo />).
> -because the HTML bundle is not namespace-aware, textmate cannot offer
> any validation. I don't mean validating against particular schemas,
> but just whether the document is well-formed XML. Here, we're talking
> about the fact that if I give <foo><bar>foobar</bar></foo>, the editor
> will understand I need to close tag <bar> before I can close tag
TM knows that it needs to use the correct closing order when you use
the "Insert Closing Tag" command under the Automation menu, but
correct, at this stage, the Syntax Highlighting does not know that your
tags are/aren't nested correctly. I think it's beyond what's possible
with SH at this stage.
> I've never had to write text editor plugins, even less XML-aware
> editors, so I'm going to be pretty useless at this, though I'm
> perfectly willing to learn.
There's not a bunch to learn... I'll get a quick version happening by
pruning/adding to the HTML one, then we can go back and fourth adding
to it, and then schedule it for release with 1.0.2 or .3.
> The most important parts of that plugin in my working life (and I
> assume anyone's who is involved in dealing with XML webapps) is tag
> and entity completion,
Well, TM doesn't do either of them, and won't for a while, AFAIK. The
"completion" is either done with snippets, or it's done by hitting
escape, which just looks at what you've already typed further up the
page, which is great for a langauge like XML with no set tags, but not
so good for HTML at this stage.
> and well-formed checking.
I don't think it can do that yet... but future versions might be able
to get it sorted. The SH is due for a major re-work at some point
after (S)FTP I think.
> Is the Textmate bundle scheme suited to tag-checking, etc.? Or does it
> simply aim to cope with syn tax highlighting and completion?
It's primarily syntax highlighting. We were able to do some nice
highlighting of things like bad ampersands to highlight problems, but
it can't really check syntax, and it can't really be language aware
much more than what it needs to alter presentation of the characters
I'll email you a bundle in a few days to try out, once I clear some
real work off my plate.
More information about the textmate