Category Archives: XMetaL

I Did Some Code!

Yesterday evening, I had an itch that needed scratching.

I was lacking some convenience features in an XMetaL-based authoring environment I am finalising for a client. There is a structure in the DTD that I am presenting as a table using some CSS in the editor, which makes perfect sense since it’s always going to be formatted that way when published. Presenting a structure as a table in XMetaL, however, means that XMetaL will hide the elements defined as table rows; it’s a side effect of how tables are presented in the editor and most editors have similar problems.

But where HTML or CALS tables are supported by XMetaL‘s customisations for tables (with adding or deleting rows or cells), my custom structure isn’t. It only looks like a table, it isn’t one because the actual semantics are quite different when studied in detail, and so the standard table functionality is not available. I needed custom code for my table-like structure.

Under normal circumstances, I’d simply walk over to a colleague, describe my problem and let him do his magic. There is something slightly twisted and evil in any object-oriented programming, and I usually want no part of it. You have an “object” that, depending on things you very often can’t see or would not fully fathom anyway, have special magical abilities you can use to solve your problem, which is all fine and well, but very often, you also have a seemingly similar “object” that doesn’t have those magical abilities. It instead possesses different ones, and because you are but a learner and only borrowing the magic wand, you eventually leave it be.

It’s evil.

But this time, I thought “how hard can it be?” and started writing, aided by other people’s efforts, an XMetaL Programmer’s Guide, and an Ouija board (no, not really; just Notepad ++). Soon, those magical objects appeared with their special abilities, and I started invoking magic using while loops and other features I know from scripting languages. Remember Mickey Mouse in Fantasia? That’s me, thinking “how hard can it be?”

The difference was that the magic here is better protected. Mickey never had access to Ctrl+Z.

Two hours later, I had my little convenience functions. The sorcerer has yet to return, but I am confident that my code works. The broom does what it’s told to do.

Visual Studio and XMetaL

I’m doing an XMetaL-based authoring environment based on scripts and stuff from earlier projects. I already have the CSS and I have most of the macros. All I need is a rules file, that is, XMetaL‘s compiled DTD file for the documents I need to write using this new environment, a few customisations, and a toolbar. For this I need to install 3.6 Gigabytes of Visual Studio .Net and XMetaL Developer. Is it just me or does any of you reading this agree with me that this is like taking an eighteen-wheeler to buy groceries? I know, I’ve ranted about this before, but it still amazes me that the XMetaL developers can allow this madness to continue.

C’mon, JustSystems, give us a way to customize XMetaL without having to buy Visual Studio. Give us what we had before XMetaL 4 and the misguided Corel deal to shut out other platforms. It doesn’t have to be like this.

XMetaL and wine 1.1.28

wine 1.1.28 (the current wine-unstable package in Debian) breaks my old XMetaL 3.1 installation. The application starts but complains about Gecko not being installed, helpfully offers to install it… and then nothing. If I stop the installation, XMetaL starts but crashes soon afterwards, probably because XMetaL needs IE components, not Gecko.

I’m sure it’s fixable, somehow, but I’m not sure I’ll bother. Oxygen runs without problems and all I need is a good enough XML editor.

XMetaL and wine 1.0

I’ve been trying to make XMetaL 3.1 work on wine 1.0, and have to say that I miss the days before the wine team replaced Internet Explorer with a wine-specific solution. Specifically, it appears that ActiveX handling has been changed to the worse.

I don’t know what’s wrong but I can no longer make XMetaL to run on my Debian/GNU Linux box.

XMetaL Revisited

I’ve had been busy doing not one but two authoring environments for XMetaL 5.1. I have to say that it’s been a very pleasant experience, in spite for my strong dislike for .NET Studio. I’ve criticized JustSystems for that before, though, so I won’t go there for the time being. Instead I’ll add my more recent (mostly positive) reflections…

The scripting/macro environment is dead easy to use, even for an amateur programmer like me. I’ve created dialogs that change content in various ways while traversing the document tree, I’ve added ID generation code for the my link target elements, I’ve implemented SVG viewing capabilities, and more, mostly without cursing. I’ve stopped trying to delegate every programming task to my colleagues, that’s how comfortable I am with it.

The editor itself is still the best XML editor I know of. If you are a professional (technical) writer there just isn’t anything better available out there. For shorter documents, sure, a text editor will do, or perhaps something like Oxygen, but for anything approaching book length, I much prefer a non-geek tool that allows me to focus on content rather than structure when writing, and structure rather than content when editing.

Found an old bug, though: You can still make XMetaL crash by trying to drag & drop a toolbar button on a new toolbar, if that toolbar doesn’t have the “flat look”. I think this one’s been an issue since 2.0 but I’d have to check my notes to be sure. (Just try exiting the toolbar dialog and KABOOM!)

And finally there’s another little thing bugging me: I have some old XMetaL dialogs that I like to use when needed, created using version 2.0. XMetaL can use them, no problem, but it can’t import them for editing in the new dialog editor. Fairly annoying, in my humble opinion.

Oxygen 9.0 Is Out

Version 9.0 of my favourite XSL IDE, Oxygen, was released yesterday. Of course, I downloaded and installed it as soon as I could, having waited for an upgrade since 8.2 came out, some six months ago. I’ve written about Oxygen before; it’s the first decent XSL IDE available for Linux, and the more I’ve used it, the more I’ve come to depend on it. See, what I especially like is the fact that I no longer need Microsoft Windows to do my XML/XSL work. Oxygen works very well in Debian/GNU Linux.

And now, it looks like I can finally re-evaluate my XML editor needs, too. So far, I’ve run XMetaL in wine, which kind of works except that right-clicking the workspace still crashes the program (but that’s fairly OK since I seldom need to right-click anything while writing). As most things in wine, it’s beta quality, no more.

Now, however, Oxygen 9.0 comes with a semi-WYSIWYG view, with CSS formatting and start- and end tag symbols, making it the first real alternative to running Windows software in wine. It is reasonably fast, too, from what I’ve seen so far, and certainly more stable than anything run in wine. You do need an official Sun Java JRE, though; it will complain if you use some of the Java replacements available for Linux, and it doesn’t work with the GNU libgcj Java Virtual Machine.

I’ll give it a more thorough test run within the next week or so, but I’m hoping that it can deliver what it promises.

XMetaL 5

I’ve spent the last few days tinkering with an XMetaL authoring environment for a client. The XMetaL version is the latest, 5.0, which is actually a lot of fun, but unfortunately it means that I’ve been forced back to Windows. What’s worse, it also means that I’m forced to develop in Microsoft’s exceedingly bloated Visual Studio .Net, surely a punishment for a previous life.

It’s beyond me to understand why JustSystems, the Japanese company that bought XMetaL from Blast Radius, insists on this dependency.

An XMetaL developer doesn’t need all the bells, whistles, and bugs that is Visual Studio, he needs a reasonably flexible scripting environment, easy access to modifying CSS stylesheets, writing (XML-based) toolbars and customizations, as well as the occasional form or dialog.

The thing is, different developers have different preferences. While I do believe that there are people that actually like Visual Studio .Net, not all of us do. Maybe we prefer other languages, or maybe we believe that forcing us to use the same tool for everything just isn’t the right way to go. After all, even if you own an 18-wheel truck, you don’t use it to drive to the supermarket to buy groceries. You use a car or a bus or a bike. Something that doesn’t get in the way.

Because that’s what Visual Studio does. It gets in the way, and more so when all you want to do is to tweak a CSS stylesheet. And I haven’t even mentioned how hard it has become to change the DTD and then recompile it and import it into your project.

And I won’t, because my blood pressure is important to me.

So while XMetaL in its latest reincarnation is very nice, I still consider version 3.1 to be superior for a number of reasons, of which one important one (to me) is that I can run it in and wine and Linux.