Transcript
Page 1: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.© 2010 JustSystems Inc.

in 37 minutes

Episode #2:

Quick and Easy Usability

in XMetaL Author

Presenter:

Tom Magliery

XML Technology Specialist

Brought to you by XMetaL Technical Services

Page 2: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.

• XMetaL Author requires a “document customization” for any document type

• Customization includes the DTD/schema, style sheets, element properties, forms, macros

• DITA customization is included with XMEE– Provides many special features for working with DITA

Background: How XMetaL works

There are 37 holes in the mouthpiece of a telephone (old style).

Page 3: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.

• Default is automatically generated• Style sheets serviceable, not especially pretty• Generic XML editing

– E.g., Working Element List and Attribute Inspector, but no DTD-specific menu items

• Authors can work, but not as efficient as they could be

• How can we improve the situation?– Techniques applicable both to new and existing

customizations

Customizations for other doctypes

All American Express card numbers start with 37.

Page 4: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.

• Know your users’ needs and wants• Study authors’ habits and preferences• Analyze common tasks• Identify inefficiencies

• Now some examples of low-hanging fruit ...

Before you begin

“I’m 37, I’m not old” – Dennis the peasant in “Monty Python and the Holy Grail”

Page 5: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.

Modify the style sheets

Easy pickin’s #1

Page 6: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.

• Style sheets are not only for aesthetics– Also should help the author to visualize markup– Improve author’s understanding of structure

• CSS is widely known standard• High visual impact

– Minimal effort can yield dramatic changes

• Don’t forget about Structure View!– Separate CSS adds further flexibility

#1: Modify the style sheets

Beethoven's symphonies comprise 37 movements.

Page 7: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.The Green Monster in Fenway Park is 37 feet tall.

• Modified DITA CSS• 37 added lines of code• Look at the difference

Style sheet example

Page 8: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.

Make new document templates

Easy pickin’s #2

Page 9: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.

• Built-in templates are simple and generic• Make templates that better match your content• Include all “required” elements

– Saves authors time

• Add/modify “replaceable text” hints– Element descriptions– Usage and style guidelines

#2: Make new document templates

"This is the 37th time I have spoken to you from this office ..." – R. Nixon's resignation speech

Page 10: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.

Creating templates for XMetaL

• Create an XML file• Save it in XMetaL’s template folders• Each subfolder makes a tab

Nixon was also the 37th President.

Page 11: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.

Creating templates for DITA

• Create a DITA file in XMetaL• Run the “Save Copy as Template” macro

– Saves with proper doctype and strips IDs

Hannibal brought 37 elephants with him on his conquest of Rome.

Page 12: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.

Change element mini-templates

Easy pickin’s #3

Elaine slept with Jerry 37 times.

Page 13: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.

• Same idea as with document templates• Except they’re littler• Change is in the CTM file• XML fragment for every element

#3: Change element mini-templates

Cool Hand Luke's prison uniform number is 37.

Page 14: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.

Write helpful macros

Easy pickin’s #4

Page 15: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.

• Computers are supposed to do the tedious work for us!

• Identify frequent, repetitive or inefficient actions• Write macros to do them automatically• Be sure to assign a hotkey

– Can also do menu/toolbar items, but we are looking at minimal effort here

#4: Write helpful macros

The landing slope angle for international ski aerials competition is 37 degrees.

Page 16: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.

• Create special-purpose commands for commonly-used elements:

Example: Insert macro

<MACRO name="Insert_Unordered_List" hide="false" key="Ctrl+Shift+B" lang="JScript">

<![CDATA[ if (Selection.CanInsert("ul")) {

Selection.InsertWithTemplate("ul"); }; ]]></MACRO>

SPAM was invented in 1937.

Page 17: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.

• No built-in command in XMetaL:– “Select entire element contents (not the tags)”

• But there is an API ... so write a macro

Example: Power-user macro

<MACRO name="Select_Container_Contents" hide="false" key="Ctrl+Shift+S" lang="JScript">

<![CDATA[ Selection.SelectContainerContents();

]]></MACRO>

There are 37 points in a “perfect” hand in bridge.

Page 18: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.

Create custom forms

Easy pickin’s #5

Page 19: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.

• Sometimes a form-style interface is more understandable

• Use XFT to create custom forms

#5: Create custom forms

The curie, a unit of radiation activity, is 37 billion disintegrations per second.

Page 20: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.

• Developer documentation– http://na.justsystems.com/content-support-user-

guides– XMetaL Customization Guide– XMetaL Developer Programmer's Guide

• XMetaL Community Forums– http://forums.xmetal.com/

• JustSystems Partner Centre – http://justpartnercenter.com/

Is there a way to ... ?

The first touchdown pass in Super Bowl history was for 37 yards.

Page 21: Quick and Easy Usability in XMetaL Author

© 2010 JustSystems Inc.

• Thank you for attending!

Q&A

“Thirty-seven!” – Dante in “Clerks”


Recommended