O'Reilly logo

Office 2003 XML by Evan Lenz, Mary McRae, Simon St. Laurent

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Coding the Smart Document

Now that you have the XML foundation laid, it’s time to integrate the data with code for manipulating it.

Required Document Actions

For our Smart Document solution, several actions will be required:

  • Apply markup and style to inline components (superscript, subscript, bold, italic, underscore, and code).

  • Insert block-level components (paragraphs, code blocks, lists, notes, and warnings).

  • Insert additional entries into lists.

  • Insert boilerplate warnings.

  • Add a graphic.

  • Create a hyperlink to a specific location.

Each action will contain a caption, a description, and help information for the end user. Upon selection, the appropriate markup will be inserted and styles applied. Pay careful attention to the Notes and Warnings; Microsoft Word, in this first release of Smart Document functionality, doesn’t always behave as expected.

Tip

In general, beware of the cursor location. The values returned by your code may not be what you anticipated; this might be due to the current setting of the tag display.

Also, paragraph styles can only be applied to objects that look like a paragraph. If your markup runs in with another style, it will either inherit the current style characteristics or change the entire block to the new style.

Designing the Document Actions Task Pane

You have created, tested, tweaked, and refined your schemas. Your stylesheets are elegant, sophisticated, funky, or whatever other look is suited to the task at hand. The XSL transformations take your existing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required