Profiling

1. Where can I find out more about profiling
2. How does profiling work
3. Add features to the chm output
4. Multiple Profile values

1.

Where can I find out more about profiling

Jirka Kosek

See the sourceforge page.

2.

How does profiling work

Bob Stayton


> I'm having trouble figuring out how to implement profile.xsl. Can anyone
> tell what I'm doing wrong?

> The first problem is that it's not preserving the structure of my book. My
> book is chunked: it calls a bunch of file entity fragments (chapters). When
> I run profile.xsl on the book, it generates the whole book in one file.
> However, I don't see way to to control chunking in profile.xsl, since it
> doesn't seem to use the normal docbook.xsl parameters & templates.

It is a two-step process.

You use profile.xsl to generate an intermediate file that has been 'profiled', that is, that meets your conditional text specs. Then you run the normal docbook stylesheet on that intermediate file. To chunk, you would just apply chunk.xsl to the output file from profile.xsl.

3.

Add features to the chm output

Jirka Kosek




> Here's my question: Is there a way I can add features to the chm output
> that apparently require you to create a [WINDOWS] section in the hhp?
> Perhaps there's a command line option to the html help compiler that I
> can use to cause it to generate an Index.hhk file? If not, should I
> submit a feature request that htmlhelp.xsl also generate an index.hhk
> file along with its toc.hhc file so that I can have my [WINDOWS] section
> point to it.

You can enable additional features in HTML Help Workshop and see what is in generated project file. By using copy and paste approach you can add [Windows] and other sections to .hhp by setting following parameter for HTML Help stylesheet:

<xsl:param name="htmlhelp.hhp.tail">
[WINDOWS]
...
</xsl:param>

> If I could get this working, it should be possible to add parameters to
> htmlhelp.xsl like "include.textzoom.button", "show.favorites.tab" and so
> on.

Yes it would. But I hadn't enough courage to study nasty hex-codes and reengeener what they mean and how they are composed. Setting these parametrs in Workshop and adding them via htmlhelp.hhp.tail is the fastest solution.

> If I use FAR to generate an Index.hhk file, I can modify the tail to
> point to it, and get bells, whistles, and an index:

You don't need Index.hhk file when producing HTML Help from DocBook. Index entries are spread over HTML files as ActiveX components and HTML Help Compiler collects them and create index for you.

4.

Multiple Profile values

Jirka Kosek



 > However, I can't specify more than one value for a condition when I run
 > profile.xsl. For example:
 >
 >       saxon -o xsample.xml sample.xml profile.xsl "os=Windows;UNIX"
 >
 > The result of this command is to OMIT both Windows and UNIX conditions, the
 > opposite of what I wanted.
 > Is it possible to get multiple values to work on the command line?

You can now. Do the following :

saxon -o xsample.xml sample.xml profile.xsl "os=Windows;Linux"

Implementing user-friendly way ("os=Windows;UNIX") has now been implemented