Don’t ask me why, but it’s been a long while since I’ve ended up delivering a really advanced XMetaL course, much less for DITA. I guess because DITA is still in fact quite “cutting edge”. In prep for giving an online XMetaL Developer course, I got inspired to share some ‘Little Known Tips and Tricks’ for XMetaL… have a look.
Training was interesting for me because for those who’ve been working with DITA for so many years now, inside what feels like the most active and thriving community this industry has ever seen, you can completely lose sight of the fact that specifically because DITA is so flexible and supported by so many tools, we’re getting more users than ever, and every day new people are showing up to the party.
When I did my Intro to DITA webinar last month, we got triple the registrations we were expecting! Obviously, there are lots of new people out there still who still need the initial light shedding on the Ol’ Darwin Information Typing Architecture…!
Also not par for the course, it was XMetaL Developer training. It was for a client that we worked with last year. They’re an independent and out-of-the-box group who always challenges me with interesting ideas and questions about the technologies they’re using, with so it’s great to be teaching them to take their solution to the next level.
Anyway – the rest of this is a bit ‘techie’ so, if that’s not your scene, be warned.
Anyone who knows XMetaL Configurations can tell you it’s great in terms of all the different ways you can represent or control interaction with an element (inline database forms, custom COM controls, toggling elements, mini-templates and so forth), but did you know that you can make these context-specific?
In the CTM file editor in Developer, right-click on any element and select “In-Parent element” and then the name of your element (I find this UI a bit messed up, but that’s how it works). You will get asked what element context you’d like and when you choose, you get a new line with your element on the left, and in the second ‘Parent’ column, you get the element you chose. Now any changes to that new line will only affect the first element when it is a child of the second! Imagine if for example
Drag and Drop and Copy/Paste Debugging
Did you know – you can debug any piece of code in XMetaL simply by copying it to the clipboard and pasting it into a document? Even things that check the user’s active selection or interact with external applications still work. All you need to do is have the proper string at the beginning of what’s on the clipboard (dragging and dropping onto the doc works too). I found it an extremely fast and useful way to play with code without needing to build a whole project or close/open XMetaL.
For JScript it’s:
// XMetaL Script Language JScript:
‘ XMetaL Script Language VBScript:
//XMetaL Script Language JScript:
Application.Alert(“Hello World!” );
OR more usefully, check variables or properties:
// XMetaL Script Language Jscript:
DITA Language Reference Inside Author (5.1 and up)
Did you notice that if you if you are using XMetaL Author (not sure if this is just in Enterprise Edition?), when you right-click on any DITA element you have a link to the OASIS DITA Language specification for that element. Don’t know what a
This kind of customised contextual help can also be applied for any DTD. I personally like to see this hosted in the Resource Manager to allow you to see help and your document in one seamless view, the way that Microsoft have learned towards a dock-able help ‘bar’ that runs down one side of the application.
If you found this interesting or have any questions, please do contact me or leave me a comment. I’m always looking for something to blog about!