Ben Langhinrichs

Photograph of Ben Langhinrichs

IBM Champion logo

E-mail address - Ben Langhinrichs






October, 2013
SMTWTFS
  01 02 03 04 05
06 07 08 09 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31

Search the weblog





























Genii Weblog


Civility in critiquing the ideas of others is no vice. Rudeness in defending your own ideas is no virtue.


Tue 29 Oct 2013, 09:25 PM
We released Midas LSX Version 5.00a with a few bugs fixes, and with the Import from Zip functionality turned on. To test it, I looked at the Eclipse help packages where all the Designer help has gone. These are packages in zip files, with an XML table of contents. The code I used looks like this after I traverse the XML files with the standard classes, then for each .html file in the Zip file, it creates a blank document, sets the form and such, then imports it.     Update: You can get a copy, just see this post.

Call rtitem.CreateBackend(doc.Handle, "Body"True)
Call rtitem.Everything.AppendHTML("File", srcfile, "Package='"+zipfilename+"' StoreMetaData='Yes' BasePtSize=11 TitleField='Subject' ")

The srcfile is something like LSAZ_WORKING_WITH_EXTERNAL_C_LANGUAGE_FUNCTIONS.html which comes from a toc.xml such as the one below, except with thousands of entries:




The HTML file is never unzipped to disk, but simply read from the zip file along with any images, the CSS stylesheets and so forth that are also part of the zipped package. The StoreMetaData='Yes' parameter simply stores a field for each meta tag in the HTML file, such as:

<meta name="DC.Title" content="Calling external C language functions" />

which will then create a field called DC.Title with the value "Calling external C language functions", thus allowing you to script based on the title, keywords, etc. The BasePtSize=11 says that all relative point sizes and default point sizes should be 11pt, so when the CSS says that the body should be 0.8em, that is 8.8, which rounds to 9pt, the standard for the Help database. The TitleField='Subject' says that the HTML title tag should be saved in the Subject field.

All that and a bit of script to update the fields from the meta data, and in 18 minutes my Domino Designer has 11997 nicely formatted and linked together documents instead of 297.

But you could play with all that if you had an evaluation license

Copyright © 2013 Genii Software Ltd.

Tags: