I've just released another TextMate plug-in:
TeXMLMate
http://www.ditchnet.org/texmlmate/
TeXMLMate is a floating palette designed for checking XML and XHTML documents for Well-Formedness and Validity while editing them in TextMate. Includes support for DTD, W3C XML Schema, RELAX NG and XInclude.
Todd Ditchendorf
Scandalous Software - Cocoa Developer Tools http://scan.dalo.us
On 27.12.2006, at 05:23, Todd Ditchendorf wrote:
I've just released another TextMate plug-in:
TeXMLMate
http://www.ditchnet.org/texmlmate/
TeXMLMate is a floating palette designed for checking XML and XHTML documents for Well-Formedness and Validity while editing them in TextMate. Includes support for DTD, W3C XML Schema, RELAX NG and XInclude.
Cool Stuff! This will come in handy for quite a lot of people. Now I’d just like an option to turn off the sound.
Glad to have you onboard, Todd.
Soryu.
PS: And glad you didn’t call it NannyMate ;)
Hi,
this seems to be a nice plugin but I have a few remarks: - It only seems to recognize changes in the document after I have saved it - It does not seem to recognize the Charset. I have some files with ISO-8859-1 which Textmate recognizes correctly but the plugin complains about some characters not being utf-8.
Also it will complain about some entities if I don't tick "Load DTD". I could imagine that many people will want to validate XHTML, so I would make this ticked by default.
Max Lohrmann
Todd Ditchendorf schrieb:
I've just released another TextMate plug-in:
TeXMLMate
http://www.ditchnet.org/texmlmate/
TeXMLMate is a floating palette designed for checking XML and XHTML documents for Well-Formedness and Validity while editing them in TextMate. Includes support for DTD, W3C XML Schema, RELAX NG and XInclude.
Todd Ditchendorf
Scandalous Software - Cocoa Developer Tools http://scan.dalo.us
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Max:
- It only seems to recognize changes in the document after I have
saved it
yeah.. this could be improved. thanks for the input
- It does not seem to recognize the Charset. I have some files with
ISO-8859-1 which Textmate recognizes correctly but the plugin complains about some characters not being utf-8.
again, thanks for the tip... i'll look into this.
Also it will complain about some entities if I don't tick "Load DTD". I could imagine that many people will want to validate XHTML, so I would make this ticked by default.
agreed.
Soryu:
Now I’d just like an option to turn off the sound.
good idea... the biggest question is how to show this option in the ui... in a normal app, I'd just put it in the prefs window, but in a plugin, i'm not sure where to put it....
thanks for the feedback guys. Updates coming soon.
Todd
On Dec 27, 2006, at 7:07 AM, Max wrote:
Hi,
this seems to be a nice plugin but I have a few remarks:
- It only seems to recognize changes in the document after I have
saved it
- It does not seem to recognize the Charset. I have some files with
ISO-8859-1 which Textmate recognizes correctly but the plugin complains about some characters not being utf-8.
Also it will complain about some entities if I don't tick "Load DTD". I could imagine that many people will want to validate XHTML, so I would make this ticked by default.
Max Lohrmann
Todd Ditchendorf schrieb:
I've just released another TextMate plug-in:
TeXMLMate
http://www.ditchnet.org/texmlmate/
TeXMLMate is a floating palette designed for checking XML and XHTML documents for Well-Formedness and Validity while editing them in TextMate. Includes support for DTD, W3C XML Schema, RELAX NG and XInclude.
Todd Ditchendorf
Scandalous Software - Cocoa Developer Tools http://scan.dalo.us
_ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Dec 27, 2006, at 9:54 AM, Todd Ditchendorf wrote:
- It only seems to recognize changes in the document after I have
saved it
yeah.. this could be improved. thanks for the input
Does this thing necessarily have to be a plugin to function? It looks like you could create an iconless application instead and launch it with a tmCommand. That would give you the ability to parse the unsaved version by simply piping the contents of the window to a temporary file using the tmCommand.
http://www.cocoadev.com/index.pl?LSUIElement
Specifies that an application is background-only but has a UI as well (usually a floating utility window). No menu bar or Dock icon, with the exception that it may have an NSStatusItem.
thomas Aylott — design42 — subtleGradient — CrazyEgg
Does this thing necessarily have to be a plugin to function? It looks like you could create an iconless application instead and launch it with a tmCommand.
There's no technical barrier to just grabbing the window's current (possibly unsaved) text from a plugin. In fact, it would probably be easier. Then again, I have no idea what a tmCommand is...
I'm looking into this, but at the moment, I'm thinking a plugin is more appropriate than a separate, pseudo-app. But I welcome input from anyone who knows more.
Todd
On Dec 27, 2006, at 10:30 AM, thomas Aylott wrote:
On Dec 27, 2006, at 9:54 AM, Todd Ditchendorf wrote:
- It only seems to recognize changes in the document after I have
saved it
yeah.. this could be improved. thanks for the input
Does this thing necessarily have to be a plugin to function? It looks like you could create an iconless application instead and launch it with a tmCommand. That would give you the ability to parse the unsaved version by simply piping the contents of the window to a temporary file using the tmCommand.
http://www.cocoadev.com/index.pl?LSUIElement
Specifies that an application is background-only but has a UI as well (usually a floating utility window). No menu bar or Dock icon, with the exception that it may have an NSStatusItem.
thomas Aylott — design42 — subtleGradient — CrazyEgg
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
I'm just thinking of ways to use your same thing there for more than just the contents of the current document. If it could handle just STDIN or a path to a file, you could use it for anything anywhere. For example, almost all of my xHtml files have embedded erb style thinggies in them which will be replaced by lovely well-formed goodness, but with your plugin, all it sees is the contents of the frontmost document.
I could easily write a textmate command that could strip out my ERB junk and replace it or even parse it and then use your tool to check it. I could make the textmate command trigger on save so I could check the XML-goodness of my pages without thinking about it.
Currently, i'd have to write a command to convert my document to xml compatible (which i would have to do either way) then output the contents of that action into a new document save it then click the validate button on your palette
Ideally, i'd like to write a command to convert my document to xml compatible (which i would have to do either way) that then outputs the contents of that action directly into your plugin and clicks validate for me and bind this command to command-s
The second way, I would get validations automatically for any and all XML scoped documents on save automatically. The first way, I have to go through 3-4 steps for each document I want to validate every time I want it to validate and I have to deal with temporary files and extra windows full of parsed out junk.
I must admit that your plugin is really quite hip and I will be using it. I just think it could be more flexible.
thomas Aylott — design42 — subtleGradient — CrazyEgg
On Dec 27, 2006, at 11:40 AM, Todd Ditchendorf wrote:
Does this thing necessarily have to be a plugin to function? It looks like you could create an iconless application instead and launch it with a tmCommand.
There's no technical barrier to just grabbing the window's current (possibly unsaved) text from a plugin. In fact, it would probably be easier. Then again, I have no idea what a tmCommand is...
I'm looking into this, but at the moment, I'm thinking a plugin is more appropriate than a separate, pseudo-app. But I welcome input from anyone who knows more.
Todd
On Dec 27, 2006, at 10:30 AM, thomas Aylott wrote:
On Dec 27, 2006, at 9:54 AM, Todd Ditchendorf wrote:
- It only seems to recognize changes in the document after I
have saved it
yeah.. this could be improved. thanks for the input
Does this thing necessarily have to be a plugin to function? It looks like you could create an iconless application instead and launch it with a tmCommand. That would give you the ability to parse the unsaved version by simply piping the contents of the window to a temporary file using the tmCommand.
http://www.cocoadev.com/index.pl?LSUIElement
Specifies that an application is background-only but has a UI as well (usually a floating utility window). No menu bar or Dock icon, with the exception that it may have an NSStatusItem.
thomas Aylott — design42 — subtleGradient — CrazyEgg
_ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Thomas, thanks for the feedback... I really like what you've described here. I'm currently working on adding schematron support to the plugin. After that I'll look into tmCommands and adding 'validate- on-save' functionality. I agree that would make the workflow much more natural/convenient. Anything that integrates the functionality more closely with TextMate interests me.
Great ideas! Keep em coming.
Upcoming features:
Schematron HTML parsing/validating (not sure about some issues here) XML Catalog support (easy management of local schemas mapped to remote URIs for offline/faster validation) verbose SAX parsing search/query document with XPath & XQuery?
Ultimately, I want full-blown 'XML IDE'-quality features in TextMate... but it will take some time.
In the meantime, you may find my other app, XML Nanny useful for validating files on disk outside of TextMate:
Todd
On Dec 27, 2006, at 11:07 AM, thomas Aylott wrote:
I'm just thinking of ways to use your same thing there for more than just the contents of the current document. If it could handle just STDIN or a path to a file, you could use it for anything anywhere. For example, almost all of my xHtml files have embedded erb style thinggies in them which will be replaced by lovely well-formed goodness, but with your plugin, all it sees is the contents of the frontmost document.
I could easily write a textmate command that could strip out my ERB junk and replace it or even parse it and then use your tool to check it. I could make the textmate command trigger on save so I could check the XML-goodness of my pages without thinking about it.
Currently, i'd have to write a command to convert my document to xml compatible (which i would have to do either way) then output the contents of that action into a new document save it then click the validate button on your palette
Ideally, i'd like to write a command to convert my document to xml compatible (which i would have to do either way) that then outputs the contents of that action directly into your plugin and clicks validate for me and bind this command to command-s
The second way, I would get validations automatically for any and all XML scoped documents on save automatically. The first way, I have to go through 3-4 steps for each document I want to validate every time I want it to validate and I have to deal with temporary files and extra windows full of parsed out junk.
I must admit that your plugin is really quite hip and I will be using it. I just think it could be more flexible.
thomas Aylott — design42 — subtleGradient — CrazyEgg
On Dec 27, 2006, at 11:40 AM, Todd Ditchendorf wrote:
Does this thing necessarily have to be a plugin to function? It looks like you could create an iconless application instead and launch it with a tmCommand.
There's no technical barrier to just grabbing the window's current (possibly unsaved) text from a plugin. In fact, it would probably be easier. Then again, I have no idea what a tmCommand is...
I'm looking into this, but at the moment, I'm thinking a plugin is more appropriate than a separate, pseudo-app. But I welcome input from anyone who knows more.
Todd
On Dec 27, 2006, at 10:30 AM, thomas Aylott wrote:
On Dec 27, 2006, at 9:54 AM, Todd Ditchendorf wrote:
- It only seems to recognize changes in the document after I
have saved it
yeah.. this could be improved. thanks for the input
Does this thing necessarily have to be a plugin to function? It looks like you could create an iconless application instead and launch it with a tmCommand. That would give you the ability to parse the unsaved version by simply piping the contents of the window to a temporary file using the tmCommand.
http://www.cocoadev.com/index.pl?LSUIElement
Specifies that an application is background-only but has a UI as well (usually a floating utility window). No menu bar or Dock icon, with the exception that it may have an NSStatusItem.
thomas Aylott — design42 — subtleGradient — CrazyEgg
__ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
_ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 27.12.2006, at 15:54, Todd Ditchendorf wrote:
Soryu:
Now I’d just like an option to turn off the sound.
good idea... the biggest question is how to show this option in the ui... in a normal app, I'd just put it in the prefs window, but in a plugin, i'm not sure where to put it....
The defaults System.
defaults read com.macromates.textmate
This is already uses by e.g. the CodeBrowser Plugin:
"CodeBrowser.function.17994EC8-6B1D-11D9-AC3A-000D93589AF6" = 1; "CodeBrowser.variable.17994EC8-6B1D-11D9-AC3A-000D93589AF6" = 0;
I think we do not really need to expose it in the GUI, but just put it in the Documentation somewhere, as people will set it only once.
Soryu.
I personally think that exposing it in the UI is a good idea. I can think of times I would like the option to hear the sound and other's I wouldn't. And having to make changes to th prefs file just to do that seems like a bit much. I think of prefs file changes for changes of functionality you want a "pro" user to be able to manipulate but don't think will change much if at all over the life of the user using the program. Like the `NSDragAndDropTextDelay` option in TextMate this controls how long you need to hold down on selected text before it becomes dragable. This is not a setting that needs to be exposed in the UI and really only needs to be set once. If you don't like the default you'll reset it to something you prefer, but I really can't imagine every changing it again.
Just my thoughts on the matter.
Also my own question to the community at large on behalf of Todd. Will he need to rewrite a lot of his plug-ins when TM2.0 comes out? Or will he's current plug-ins potentially port over easily. Just I know I'd be frustrated if I did a bunch of work and then found out I would have to do it all over again a few months latter :-P
-Brian
On 12/27/06, Soryu Soryu@serenity.de wrote:
On 27.12.2006, at 15:54, Todd Ditchendorf wrote:
Soryu:
Now I'd just like an option to turn off the sound.
good idea... the biggest question is how to show this option in the ui... in a normal app, I'd just put it in the prefs window, but in a plugin, i'm not sure where to put it....
The defaults System.
defaults read com.macromates.textmate
This is already uses by e.g. the CodeBrowser Plugin:
"CodeBrowser.function.17994EC8-6B1D-11D9-AC3A-000D93589AF6" = 1; "CodeBrowser.variable.17994EC8-6B1D-11D9-AC3A-000D93589AF6" = 0;
I think we do not really need to expose it in the GUI, but just put it in the Documentation somewhere, as people will set it only once.
Soryu. ______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 27.12.2006, at 23:00, Brian Landau wrote:
<snip>
Just my thoughts on the matter.
Fair enough. I just want no app to play any sounds. Like when I hear via headphones but have the volume controlled in iTunes instead of the System Volume and some application thinks it needs to play a sound at 100% volume. *boom*
Also my own question to the community at large on behalf of Todd. Will he need to rewrite a lot of his plug-ins when TM2.0 comes out? Or will he's current plug-ins potentially port over easily. Just I know I'd be frustrated if I did a bunch of work and then found out I would have to do it all over again a few months latter :-P
Only Allan can answer this question and maybe not even right now. And even then: TM 2.0 is nowhere near done, I think. I don’t know what API he exposes for plugins, but the one to add the menu item should be fairly easy. As for the rest, Todd here did some reverse engineering and as someone just discussed in another thread, TM 2.0 will likely feature a whole different Textedit Component incl. rendering subsystem (which is one of the main reasons why it will be leopard only) – so that part (based on class dumps) will most likely not run without modifications.
To summarize I’d say it depends on how deep the plugin digs into the existing stuff. If it is only used to highlight a certain line and read the contents from the Text area it should be fairly easy to adapt.
Soryu.
TeXMLMate 1.2 is out:
http://www.ditchnet.org/texmlmate/
First, validation against Schematron is now supported. If you haven't seen schematron, I highly recommend reading about it here (it's the bomb):
http://www.ldodds.com/papers/schematron_xsltuk.html
Second, there's now a checkbox in the UI for toggling sound on/off. it's off by default. this clutters the ui a bit, but it was the least crappy solution i could think of for now.
- It only seems to recognize changes in the document after I have
saved it
This is fixed. No more need to save your document before parsing -- TeXMLMate will pick up the most current text in the front most window, saved or not. One caveat, you must save the document to disk at least once (so libxml can have a base uri to work with).
- It does not seem to recognize the Charset. I have some files with
ISO-8859-1 which Textmate recognizes correctly but the plugin complains about some characters not being utf-8.
Er... this is kinda embarrassing, but Turns out that TeXMLMate 1.1 & earlier had some *serious* encoding issues with non-ASCII text. For XML software, that's really totally unacceptable.
I *think* I've got everything worked out... There are no UI additions, but TeXMLMate should intelligently auto-discover (with or without an encoding psuedo-attribute on the XML prolog/decl) any encoding that TextMate is capable of saving your document in, and handle it correctly when parsing. This sort of thing is , of course, fully supported by libxml (which powers TeXMLMate), but frankly, I was f*cking it up. :)
I encourage anyone with non-ASCII XML documents lying around to please kick the tires on 1.2 and send me a quick note with a thumbs up or brief bug report.
Also it will complain about some entities if I don't tick "Load DTD". I could imagine that many people will want to validate XHTML, so I would make this ticked by default.
Agreed. this is now be the default.
A huge thanks to all who've sent feedback and bug reports. Response for this little plugin has been *way* beyond what I expected, and I'll def. be working on more features.
Thanks again,
Todd Ditchendorf
Scandalous Software - Cocoa Developer Tools http://scan.dalo.us
On Dec 27, 2006, at 7:07 AM, Max wrote:
Hi,
this seems to be a nice plugin but I have a few remarks:
- It only seems to recognize changes in the document after I have
saved it
- It does not seem to recognize the Charset. I have some files with
ISO-8859-1 which Textmate recognizes correctly but the plugin complains about some characters not being utf-8.
Also it will complain about some entities if I don't tick "Load DTD". I could imagine that many people will want to validate XHTML, so I would make this ticked by default.
Max Lohrmann
Todd Ditchendorf schrieb:
I've just released another TextMate plug-in:
TeXMLMate
http://www.ditchnet.org/texmlmate/
TeXMLMate is a floating palette designed for checking XML and XHTML documents for Well-Formedness and Validity while editing them in TextMate. Includes support for DTD, W3C XML Schema, RELAX NG and XInclude.
Todd Ditchendorf
Scandalous Software - Cocoa Developer Tools http://scan.dalo.us
_ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate