Abstract
The DOM is arguably a flexible, powerful and most popular API for manipulating XML in use today. Nevertheless, there are certain issues, which you need to be aware of before you go ahead with an application relating to DOM interface implementation.
This session will focus on sharing the key challenges experienced during the design & implementation of DOM interface for QuarkXPress, which is the leading publishing software by Quark Inc. and is used by more than three million customers around the world. It provides all the tools required to create, design, and deliver high-impact publications in both print and electronic media.
By developing a DOM interface for QuarkXPress, we create a common methodology for developers of navigating, extracting, and setting content and attributes stored within QuarkXPress.
The Implementation
The prerequisite for any application to support DOM interface is to provide a hierarchical structure to its document. A schema was created for QuarkXPress using XML Schema Definition Language (XSD).
The next step was implementation of DOM APIs as per W3C specs. These APIs internally call native application functions to add, delete or access QuarkXPress' document structure. Xerces, an XML Parser by apache.org, was used for creation and maintenance of the DOM tree.
The implementation allows for users to create, delete and access all of the nodes in the QuarkXPress document structure.
The Challenges
1. How to handle change of the document structure/schema on the fly i.e. element types get added/deleted at run time?
2. DOM is suited to model a document and not an application. What happens to App's UI constructs such as menus and dialogs, which are not tied to a document?
3. How to perform actions such as 'print', 'spell check' on the document through DOM API?
4. DOM, being an XML based API, caters to textual input and output data. What if I wish to pass binary data such as pictures?
5. My APIs are not type safe since everything is a DOMString. Do I have to sacrifice type safety?
6. How can I pass/retrieve OS objects such as font, port through DOM APIs? Well, they don't belong to the document.
7. DOM events, they are too many if you follow the spec. If 10 attributes of a box are modified, will I receive 10 separate events while I just needed one? How does it affect performance?
8. How to represent inter dependencies among elements/attributes of the schema? E.g. there's no way in XSD to say that attrib 'a' of element 'Ea' is available only if attrib 'b' of element 'Ea' is set to true?
Keywords
Since this was a product presentation, no paper was prepared for the proceedings.
![]() ![]() |
Design & Development by deepX Ltd. |