Re: [docbook-apps] Docbook xml title containing double quotation marks causes CHM TOC issue

From
Tracy Huang Gmail <>
Date
2010-12-28T01:32:32+00:00
ID
321B8E1D1BE74B48A574BB699782450E@app307c43c3de3
Thread
Re: [docbook-apps] Docbook xml title containing double quotation marks causes CHM TOC issue
Hi 
Bob,

 

Thank 
you for the suggestion! I will install and try Saxon 6 later.  And enlightened by another user Sarah 
Cheng, I have worked around the issue by adding the following Escape Characters 
(&#147; - left double quote, &#148; - right double quote) in the xml 
file:

 

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

 

Regards

Tracy

 

  
----- Original Message ----- 

  
From: 
  Bob Stayton 
  

  
To: Tracy Huang Gmail ;  
  

  
Sent: Monday, December 27, 2010 12:42 
  PM

  
Subject: Re: [docbook-apps] Docbook xml 
  title containing double quotation marks causes CHM TOC issue

  

  
Hi,

  
Try using Saxon 6 instead of 
  xsltproc.

  
 

  
Bob Stayton
Sagehill Enterprises


  
 

  
 

  
    
----- Original Message ----- 

    
From: 
    Tracy 
    Huang Gmail 

    
To:  
    

    
Sent: Thursday, December 23, 2010 5:26 
    PM

    
Subject: [docbook-apps] Docbook xml 
    title containing double quotation marks causes CHM TOC issue

    

Hi All,

When I use 
    double quotation marks ("") to quote a word in the xml 
    
<title></title> element, the generated CHM TOC entry only 
    shows the word 
qupted, not the complete title.

I have the 
    following XML file (please note the quotation marks in the title 
line: 
    <title>Loading "heavy" window</title>):

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

<chapter version="5.0" 
    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>

   
    <title>Loading "heavy" window</title>

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

 </sect1>

</chapter>

Then 
    I complied the XML file to htmlhelp files using the following 
    command:

xsltproc 
    
D:/unix/usr/share/sgml/docbook/docbook-xsl-1.75.2/htmlhelp/htmlhelp.xsl 
    
about_this_book.xml

Then I compiled the htmlhelp files to 
    CHM file using Microsoft HTML Help 
Workshop.

But when 
    opening the CHM file, and expanding the TOC list in the Contents 
area, 
    the TOC entry shows only one word: heavy, rather than: Loading 
    "heavy"
window.

When looking at the hhc file, it's like 
    this: value='Loading "heavy" 
    
window'.

<LI><OBJECT 
    type="text/sitemap">

<param name="Name" value='Loading "heavy" 
    window'>

<param name="Local" 
    value="index.html#id1330919"></OBJECT></LI>

Any 
    suggestions on how I can fix this if I want to keep the quotation marks 
    
in title? Or should I avoid using quotation marks in the title element 
    at 
all?

I appreciate any input for this! Thank 
    you!

Regards

Tracy Huang

Technical 
    Writer

China