Author Archives: admin

XMetaL Linux Update

I’ve been toying with XMetaL on Linux and Wine, with varying degrees of success. It’s quite obvious that the XMetaL/Wine/Linux combo isn’t ready for prime time just yet, but it’s so close.

I’ve had some interesting problems along the way, most importantly that the Save As function isn’t reliable. Or rather, it doesn’t work with relative paths. If you want to save a file, but only enter a filename in the dialog, XMetaL says things like “File is read-only” or “File doesn’t exist”. A little investigating shows that the save component is unable to fill in the correct path to the file, and therefore cannot find the location. This problem is cured by entering a Windows-like path to the file, for example, D:myfile.xml. (Note that your home directory is D: in Wine.)

The absolute path problem can be a character encoding problem (for example, the save component could very well use some weird Windows keymap scheme instead of pure Unicode; XMetaL is supposed to run on Windows 98, an OS not known for its Unicode capabilities) but there are other variables in the equation, too. For one, I suspect that Wine’s file path translation also matters.

A lesser, but still annoying, problem is that a saved XMetaL window size (when starting the application) doesn’t work at all if you’ve set Wine to Windows 98 mode. It works more often in Windows 2000 or XP modes, but not every time, which I don’t understand at all. Also, XMetaL forgets the view mode (tag view, normal view, etc), for some reason, not necessarily the same.

On the other hand, I’ve successfully been able to use (most parts of) X4, an XMetaL authoring environment that we developed at Information & Media a few years ago. This is good news since while I can live with writing in OpenOffice, it doesn’t beat a real XML editor with a decent authoring DTD and environment.

I expect that Wine 1.0, when out, can solve some of the current problems. I’ll keep you posted.

Wrong Planet to an Elliptical Orbit

Wrong Planet, the autism/Asperger forum I wrote about the other day, is a bit shaky at the moment after some issues concerning privacy, censorship, and moderation policies. It’s still a great, great resource but right now, things are a bit tense. It’s quite possible that the events of the last few days–of which you can’t form your own opinion since the relevant posts are no longer there–will hurt WP and other forums, such as On the Spectrum, will gain increase their membership counts fast.

We’ll see. The situation’s as close to a soap opera you’ll get among Aspies and Auties.

XMetaL, Later Versions

Running XMetaL in Debian is cool. Very cool, even, and I have loads of fun right now. However, I need to point out that the version I installed is 3.1. In other words, Corel’s first XMetaL release. Earlier versions should work, even though I doubt 1.2 or 1.0 will prove meaningful because of the problems early versions had in general.

Later versions, however, will give you problems in Wine. I think XMetaL 4 Author could be forced to run, but since Corel struck a deal with Microsoft and integrated the developer parts of the editor with Visual Studio, you’d better be prepared for a long night. Visual Studio requires a lot of patience, and I won’t even try to install it since the very idea sort of negates the point with running Linux in the first place. Microsoft, the empire of evil, and all that…

However, if you decide to go ahead, please post a note about it. Or better yet, email Blast Radius, the current keeper of the XMetaL flame.

Yet Another Rant on XML Tools

Being an XML developer isn’t always easy if you’re running Linux, not if you aren’t happy with emacs and nxml-mode. Not that I don’t like emacs; I do, but there are limits to what it can do. But before I go on, let’s get some things straight. This post is basically a rant on XML tools so if you aren’t an XML geek, or if your particular flavour of geek-ishness differs from mine, then go read something else, say, Henrik’s Ruby articles.

So anyway, moving on… If you develop DTDs, for example, you need something to visualize the DTDs with. I always liked Near & Far from Microstar, even though the product is dead and gone, and it’s impossible to buy it anywhere. Luckily, I have a copy (which I’m not selling, thank you very much), and even though it’s Windows software, it runs just fine on Wine/Linux.

Not that I’d want to actually create DTDs using Near & Far. It’s not good enough; for the actual writing, a text editor, say, emacs, is still by far the best choice. Near & Far will ruin any modularization you ever wanted for your DTD, it likes to normalize anything and everything it sees. But for pure visualization, it’s great.

It’s somewhat worse with XSL software. There are IDEs for XSLT available for Linux, but most range from bad to awful, and I’ve given up on all but one of them. The remaining one is ActiveState’s Komodo, a payware IDE that you can use for your Perl and Python stuff, too. The version I have, 3.01 is somewhat dated, but runs great on my Debian box. And newer versions are supposed to handle Ruby and PHP, too, but don’t take my word for it.

Unfortunately, it doesn’t do XSL-FO natively. Sure, you can write your transformations to FO in it but there’s no help for the target FO namespace, only your basic XSLT. It’s possible to write a macro to couple your debugging with, say, FOP, to get PDF output right off the bat, but that’s not the real issue. I want FO namespace help. Context-sensitive help, thank you very much.

XML Spy does this help-on-FO-namespace part, but I haven’t managed to install it; yes, I know it’s possible because it’s listed on the various Wine compatibility lists, but I’ve failed miserably so far. I’ll try again, one of these days, now that XMetaL finally made it to Linux.

And also, I never liked XML Spy. I know, people hold it in high regard, but I bet all of them are codeheads (you can’t join if you have to ask; I’m a dochead myself). XML Spy is just so… not document-oriented. It’s for programmers, the kind I’m most certainly not.

Then there’s Oxygen, a payware IDE that is available for Linux as well as Windows. Unfortunately, it’s yet another tool created for (and by) those codehead people. It’s like a text editor on steroids, only it’s a bad trip and I prefer emacs if I must go down that road. Also, there’s an Eclipse plugin available but the last time I tried a demo version, it messed up my Eclipse installation beyond all reason, and I had to remove both to recover my sanity. I’m not going to try again unless there is a very, very good reason for me to do so. Like if a client pays me to.

And that’s that. There are a few other tools available for Windows that I’m going to try one of these days, but since this was basically a rant, I’m not going to waste time and space on them now. Cheers!

Of course, there are lots of command line XML tools available, and I’m not complaining there. I’ve got just about everything there, from OpenSP to Jade (yes, every now and then it’s nice to have it to do DSSSL), and to, of course, FOP.

Finally, XMetaL on Linux!

Wine (Wine Is Not an Emulator, the open-source Windows environment available for Linux) is nearing 1.0, after some 12 years (or is it 13?) of development. The current Debian version is 0.9.7, and it’s actually pretty darn good. So good, in fact, that I decided to try installing XMetaL again. The avid reader of this blog might remember my last tirade about the sorry state of XML editors available for Linux, when all my attempts at installing XMetaL had been unsuccessful and I was losing hope.

But I tried again today, optimistic as ever, and here’s the result:

Pretty cool, huh? It’s XMetaL 3.1, running peacefully on my Debian box. It’s not perfect yet, not by a long shot, but it runs!

Here’s what to do (and mind you, I’m not going to list the trivialities of installing Wine or its helper apps, you’ll have to do that part yourself):

  1. Set Wine to Win98 mode. It’s the easiest mode, by far.
  2. Install Internet Explorer 6 SP1 by following the instructions at Frank’s Corner. The DLL overrides are important; don’t forget them!
  3. Install Microsoft Active X Control Pad. It’s available as a download from Microsoft, but it’s also on the XMetaL CD.
  4. Install Windows Scripting Host 5.6 from the XMetaL CD. This went like a charm, BTW, in stark contrast to my attempts using earlier versions of Wine. I don’t know why it’s that difficult; others have installed WSH before on older Wine versions…
  5. Then install MDAC from the XMetaL CD. Use a version no newer than 2.1, if you use another source.
  6. Install XMetaL using Custom options. Do not forget Templates and Samples. The XMetaL installation might complain about WSH missing; in that case, reinstall it after completing the XMetaL installation.

This should be all. In other words, it worked for me. There are some weird bugs, though (if you try this, and figure out why the weirdness is happening, contact me):

  • If you choose Tools->Options, you mess up your KDE taskbar, for some strange reason. Change any settings using the configuration file in the XM directory instead.
  • Customized toolbars do not always work. I suspect there are things in WSH not recognized by Wine, as of yet.
  • In a similar manner, some Insert Elements events will not work, probably because WSH is doing something weird.

Obviously, I’m not going to offer any support on this, even though I will most likely respond to a polite query. And I’m not, repeat, not, responsible for any damage you might cause to your computer when following the above instructions.

It certainly looks like I finally have a decent XML editor for Linux, though. I’m going to tinker with Wine/XMetaL for a while, and post any success stories here.

Look Ma, No Bugs!

I recently delivered a bunch of XSLT templates to a (very) large client. They replied today, after a day or two of testing, stating that there are no bugs! Almost automatically, I was reminded of Lars Wirzenius’ priceless list of programming truths. For example, If it runs, it doesn’t have any bugs. But especially A 1% crash rate is actually pretty darn good.

Footnote: Lars Wirzenius is less well-known than Linus Torvalds, but probably fairly important to the overall development of linux. They are friends, and have been so for a long time.

Get Rid of That Rain Man Image!

I’ve been reading www.WrongPlanet.net a lot lately. For those who don’t know, it’s a site for those afflicted with autism or Asperger Syndrome, and for their families and loved ones. There are articles and various resources available, as well as some high-traffic forums devoted to every aspect of autism and Asperger.

The forums, of course, are what makes Wrong Planet fun to read. If Dustin Hoffman is what pops up in your brain whenever somebody says “autism”, do yourself a favor and go read Wrong Planet. These people are opinionated, intelligent, and articulate, and just about as far from Rain Man as you can get.

It’s Over!

The film festival, that is. I screened 55 feature films in 11 days, some good, many bad, and some just boring. I would like to see the Canadian film C.R.A.Z.Y., though, instead of just screening it and watching bits and pieces. Great music and some very funny moments.

Anniversaries…

Next year’s supposed to be the 30th anniversary of Göteborg Film Festival. Only, it isn’t. I was present in the projection booth when what was to be the 13th festival was relabeled 14. Superstition was quoted as the primary reason by the then-festival-general Mr Gunnar Bergdahl, who could make a career at certain airlines with similar ideas.

Just a friendly reminder; I dislike history rewrites.