cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

An ACL Tool to Find and Replace XML Attribute Values [AUG Meeting]

lfraley
12-Amethyst

An ACL Tool to Find and Replace XML Attribute Values [AUG Meeting]

Legal publishing uses a lot of attributes, and CCH publications are some of the richest legal reporting available. When we converted to SGML nine years ago, one of the first things our users requested was a way to modify attributes globally outside the Arbortext Editor Modify Attributes dialog. Often they have been required to open XML files in Notepad, or Edit as XML Source to change attributes in large files, which led to error and was very time-consuming. The project got on the schedule in 2007, and we started the initial analysis, starting with what language to write the tool in, and how to create the interface.

 

Because this tool requires a good deal of querying the DTD, we decided to write it in ACL. The interface requirements included making it impossible for a user to create invalid XML. For example, the tool needed to remove #FIXED attributes from the attribute list, and, if the user wanted to delete attribute values, the tool needed to remove #REQUIRED attributes from the list. While the Arbortext Object Model (AOM) exposes only a namelist of required attrs, these attribute types are exposed by the tag_attr_required() and tag_attr_fixed() ACL functions. Dozens of such calls that query the DTD or a given Object ID (oid) are easily accessible in ACL.

 

Because this tool requires a complex dialog box with 24 dialog controls, and because we wanted to give the users a beautiful dialog box, we needed a way to create the dialog that would allow us to drag and drop dialog elements, resizing and changing appearance in real time. We used ACL Designer, a powerful but unsupported interface design tool that, with a conversion program that ships with Arbortext Editor, can be used to create XUI dialog boxes with a wide variety of controls. The ACL dlgitem functions allow granular management of dialog item controls.

 

As Spider-Man knows, "With great power comes great responsibility." The Global Attribute Find-Replace tool can save a huge amount of time, but it can also destroy a lot of content very quickly. The danger of using the tool incorrectly is mitigated by two layers between the core find-replace function and the user: a business-logic layer, which allows granular control over what the user can and can't do; and a dialog layer, which  allows XML-aware control over user input. Because of this tiered approach, it was easy to develop another tool on top of the core function.

 

This presentation will show you

  • an end-to-end example of Requirements Gathering, Technical Design, and Application Development for a complex XML tool
  • powerful XML and dialog functions in ACL
  • a "tiered" approach to application development
  • tips on controlling dialog behavior
  • XUI tips
  • ideas for interface design and implementation
  • This project involved a great deal of requirements gathering, meetings, testing, signoffs, and ongoing user input, to come to fruition. The process worked, and we now have a valuable addition to Editor functionality that saves a great deal of time and error.

 

About the Speaker

Todd Hicks, Wolters Kluwer North America Global Platform Organization

Todd Hicks has been working in legal publishing for 20 years, and with Arbortext for ten years. In high school he ran the old printing press, and knew then that he wanted to be involved in publishing. An English major in college, he became a proofreader for CCH, Incorporated, and quickly moved to technical writing, and then to programming, especially for publishing and user interfaces. When CCH converted to SGML, he wrote Wordbasic/Onmimark scripts; when CCH started using Arbortext Adept Editor, he learned ACL, Java, and Javascript, built dozens of tools, and designed the infrastructure for the editor and its interface with Information Manager, our CMS at the time. He now leads a team of Editor programmers to build tools and infrastructure for Arbortext Editor and its interface with Documentum at Wolters Kluwer. He has presented three times at Arbortext conferences.

 

Originally Recorded: Saturday, 23 October 2010, 9:00-10:30 AM Pacific/US

 

 

View the Recording

The video is on our YouTube Channel!

 

0 REPLIES 0
Announcements

Top Tags