I use Voodoopad to create my help docs, as described here. Basically I have a Run Script build phase which tells Voodoopad to export my document as html. The Voodoopad doc is set to run hiutil to create the help index when it exports.
After noticing that many of my help anchors weren’t working, I traced it back to hiutil. When I run hiutil on the html exported from Voodoopad, I get a bunch of errors:
Zach-iMac:Desktop zach$ hiutil -a --create Help/ --file Help/Help.helpindex -1 -vvv
index.html -- Parse error: The operation couldn’t be completed. (NSXMLParserErrorDomain error 76.)
index.html -- Parse error: Error 76, Description: (null), Line: 14, Column: 8
index.html -- Finished parsing
These errors are repeated for every single file. Line 14, column 8 is the closing of the head tag. The first part of every file is basically the same:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta name="AppleTitle" content="VideoBuffet Help">
<meta name="AppleIcon" content="appicon16.png">
<title>Index</title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1138.23">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Lucida Grande'}
</style>
</head>
<body>
This exact HTML used to work just fine with hiutil. Since the last time I’ve run this I upgraded to Mountain Lion and Xcode 4.5.
Is anyone else using hiutil, and is it working for you?
If you use this prologue at the top of your HTML file:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
and run your HTML through a validator like http://validator.w3.org/#validate_by_upload+with_options
and fix all the problems until the validator returns success, it should work with hiutil 1.3. It did for me anyway.
See also http://lists.apple.com/archives/apple-help-authoring/2012/Sep/msg00018.html