Monday, September 26, 2005

Running Arbortext Interchange in batch mode

I've been banging my head on my desk for several weeks trying to figure out how to run Arbortext Interchange in batch mode. For those unfamiliar with Interchange, it is an application that can convert Word, FrameMaker, Interleaf and other formats to XML.

I have successfully built a map file, mapping Word styles to DocBook XML tags, and run the map file successfully in the standalone application. My client, however, purchased the E3 content engine and has a large volume of Word documents that needed to be converted. Doing this manually was going to be a time-consuming manual task. I knew Interchange had a batch mode, but kept getting errors, or no output.

For those interested, here is the proper syntax (all on one line for each entry in the batch file):

C:\progra~1\Arbortext\E3\bin\epic.exe -E3w -b -c
 "import_doc('C:/temp/docs/infile.doc', 0, 'C:/temp/docs/outfile.xml',
 'C:/progra~1/Arbortext/E3/custom/doctypes/client/word-docbook-map.xml',
 'C:/progra~1/Arbortext/E3/custom/doctypes/client/import-template.xml',
 1,'C:/temp/docs/infile.log' ,1);quit"

I was missing the -E3w parameter in my script...

Categories: ,

Tuesday, September 20, 2005

DocBook element lookup for DocBook:The Definitive Guide

I usually use the quick bookmarks (see my earlier blog entry) to take me to the element reference in Norm Walsh's "DocBook:The Definitive Guide". Thanks to Michael Smith and techntonik, there is a new way to look up DocBook elements in TDG. Go to http://farplugins.sourceforge.net/test/docbook/index.php to try it out. They are looking for a permanent home for this script. Any takers?

I really like the suggested elements, when you first start typing your search. Try typing "ref" and it will give you a list of all the DocBook elements starting with "ref" (refclass, refdescriptor, refentry, refentryinfo, refentrytitle, reference, referenceinfo, refmeta, refmiscinfo, refname). Try it, you'll like it!

Update: Michael Smith has copied the code to http://docbook.sourceforge.net/element/, which should be a more permanent home than the farplugins page...

See also:

Monday, September 19, 2005

OpenOffice to DocBook converter

For those who have tried converting OpenOffice/StarOffice documents to DocBook or vice-versa, you probably experienced the pain of trying to get the built in stylesheets to work. I worked on some of the earlier versions of those stylesheets, and the stylesheets still have some obvious problems. There also was no way to limit the styles a user could apply to the document.

A new and promising add-on hopes to make the DocBook/OpenOffice integration easier! Enter ooo2dbk from Indesko. This package supports output to article or book documents that are DocBook 4.3 compliant, using a python script.

I'll provide a review when I get a chance to try it out. I'm also eager to test out the latest OpenOffice 2.0 beta 2, which provides support for XForms!

Update: Thanks to Laurent at Indesko, I was able to get this running on the latest Open Office 2.0 beta 2. You can install the ooo2dbk package by going to Tools > Package Manager. I restarted OpenOffice (to be safe), and the Indesko menu appears with the other menus. I opened the included template, and the ooo2dbk program is available to run from the Indesko menu. After saving the file to a .sxw file, from the command line (I used Cygwin), I ran the following command:

ooo2dbk --article --zipfile=document.zip document.sxw

which created a zip file with images and the DocBook XML file. I validated it in oXygen 6.2, and it worked just fine! I'll try linking to the XSLT directly from Open Office next, so I don't have to use the command line. Give it a try!

See also:

Oxygen 6.2 now available!

The folks at SyncRO Soft have released the 6.2 version of oXygen, my personal favorite XML/XSL/Schema editor! Details on the new features are available at: http://www.oxygenxml.com/index.html#new-version.

What I like about oXygen is it's standards support (especially RelaxNG!) and it's highly configurable parsing features. It has Xerces, Xalan, Saxon, FOP , Jing, Trang and xsltproc built in.

It's extremely powerful, including support for XML 1.0, namespaces, DTD, XML Schema 1.0, Relax NG, XSLT 1.0 and 2.0, XPath 1.0, XSL-FO, XQuery 1.0, SVG 1.1, WSDL, CSS, Unicode 3.2, DocBook 4.3, TEI and Schematron!

My other favorite feature: it's multi-platform. I have personally run it in Solaris, Mac OS X, and Windoze.

This editor isn't as user-friendly for the common author as Arbortext Epic, but for XML hacks, I'd say oXygen has all the other editors beat - hands down.

Try it for yourself. There's a free 30-day trial available on the site. I'd be interested in your comments on oXygen and other editors, too.

See also:

Tuesday, September 13, 2005

XQuery Basics with Saxon

The Abbey Workshop has posted an excellent tutorial on learning XQuery basics using the Saxon parser. Check it out at: http://www.abbeyworkshop.com/howto/xml/xql-saxon-basics/index.html.

I've tried to standardize on Saxon for all of my XSL parsing needs, as it has had the best performance and fewest problems of all the parsers I've tried. Michael Kay has done an excellent job adding support for the latest XML standards. I also use his book on a frequent basis - if you don't have his XSLT Programmer's Reference, you need it!

See also:

Sunday, September 11, 2005

We Live

On this, the fourth anniversary of the September 11 attack on the United States, I have the song "We Live" by Superchic[k] running in my head. The lyrics are particularly poignant and appropriate:

There's a cross on the side of the road
Where a mother lost a son
How could she know that the morning he left
Would be their last time she'd trade with him for a little more time
So she could say she loved him one more time
And hold him tight
But with life we never know

When we're coming up to the end of the road
So what do we do then
With tragedy around the bend?

Chorus:
We live we love
We forgive and never give up
Cuz the days we are given are gifts from above
Today we remember to live and to love
We live we love
We forgive and never give up
Cuz the days we are given are gifts from above
Today we remember to live and to love

There is a man who waits for the tests
To see if the cancer has spread yet
And now he asks, "So why did I wait to live till it was time to die?"
If I could have the time back how I'd live
Life is such a gift
So how does the story end?
Well this is your story and it all depends
So don't let it become true
Get out and do what we are meant to do

Chorus

Waking up to another dark morning
People are mourning
The weather in life outside is storming
But what would it take for the clouds to break
For us to realize each day is a gift somehow, someway
So get our heads up out of the darkness
And spark this new mindset and start to live life cuz it ain't gone yet
And tragedy is a reminder to take off the blinders
And wake up and live the life we're supposed to take up
Moving forward with all our heads up cuz life is worth living

Chorus (to fade)

We will never forget what happened that tragic day, nor even the recent events of Hurricane Katrina. We must live, love, forgive and never give up!

See also:

Wednesday, September 07, 2005

New, improved URL: http://scottysengineeringlog.net

Hi there, loyal readers! I bit the bullet and reserved an easier to remember URL for this blog: http://scottysengineeringlog.net! It's not any shorter to type, but hopefully easier to remember. Also, I don't have a great way to track hit stats on the blog, but if you enjoy reading the blog, please post a comment or send mail to scottys.log AT gmail.com I would enjoy hearing from you!

What's really funny, is that my old blog on blogs.sun.com still gets over 600 hits per day, and I left in February! So, now might be a good time to update those bookmarks :-)

Technorati Profile

See also: