← Prev in month ← Prev in thread

filename prefix feature is not working?

From
"Sracy Iuang Hmail"
Date
2010-12-28T02:50:04+00:00
ID
4A580702A351484FAF949B96A5DC3750@app307c43c3de3
Thread
filename prefix feature is not working?
Hi 
All,

 

I tried to 
follow instructions on http://www.sagehill.net/docbookxsl/Chunking.html, to 
add prefix to the html file names. Here is what I did.

 

I have the 
following test.xml file:

<?xml 
version="1.0" encoding="utf-8"?>

<chapter 
version="5.0" xml:id="About_This_Book" 
xmlns="http://docbook.org/ns/docbook"

         
xmlns:ns5="http://www.w3.org/1998/Math/MathML"

         
xmlns:ns4="http://www.w3.org/2000/svg"

         
xmlns:ns3="http://www.w3.org/1999/xhtml"

         
xmlns:ns2="http://www.w3.org/1999/xlink"

         
xmlns:ns="http://docbook.org/ns/docbook">

  <title>About This 
Book</title>

 

  <sect1 
xml:id="Loading_heavy_window">

    <title>Loading 
&#147;heavy&#148; window</title>

    <para>An example of 
using quotation marks in title.</para>

  </sect1>

  

  <sect1 
xml:id="Loading_heavy_tab">

   <title>Loading 
&#147;heavy&#148; tab</title>

   <para>Another example of using 
quotation marks in title.</para>

  </sect1>

  

</chapter>

 

I complied 
the xml file using either of the following two commands (both generate 
the same error):

xsltproc 
--stringparam base.dir windows- 
D:\unix\usr\share\sgml\docbook\docbook-xsl-1.75.2\htmlhelp\htmlhelp.xsl 
test.xml

xsltproc 
--stringparam base.dir windows- 
D:\unix\usr\share\sgml\docbook\docbook-xsl-1.75.2\html\chunk.xsl 
test.xml

 

I got the 
following html files generated (the file name is added with the prefix 
"windows-" correctly):

windows-index.html

windows-ch01s02.html

 

But when I 
opened the html file and searched for ※href§, I found in both files: 
all ※href§ point to the file name without the prefix "windows-", so all 
previous/next/toc links go wrong.

href="index.html"

href="ch01s02.html"

 

Is this a 
bug or have I missed something? 

The 
filename prefix feature would be a great feature for me, as our 
product is working on many different platforms, for each platform, we created an 
installation guide, but when all these installation guides (as well as the other 
guides) are merged into one CHM file, the CHM Back and Forward buttons cannot 
always jump to the correct html topic, to be exact, it can find the correct file 
name, but as these installation guides (as well as the other guides) have 
identical html file names, such as ch01s02.html, ch03s01.html etc., the Back and 
Forward buttons find the file in all CHM files merged (starting from the 
currect page to the end, CHM by CHM) , not by finding within the CHM file I 
am reading now (I think this is a bug in CHM), so it may direct me to 
the html topic for the wrong CHM file, for example, when I am reading 
the install guide for Windows platform, after several Back clicks, I 
am reading the install guide for Unix platform now. So I tried to use the 
filename prefix feature to add prefix to the html file name to distinguish file 
names from CHM to CHM, such as windows-ch01s02.html, unix-ch01s02.html, 
linux-ch01s02.html etc.

 

Regards

Tracy 
Huang

Technical 
Writer

China
← Prev in month ← Prev in thread