docbook-apps

Expand all | Collapse all

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

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

    Posted 12-28-2010 01:32
    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 (“ - left double quote, ” - right double quote) in the xml file:







    Regards

    Tracy



    ----- Original Message -----
    From: Bob Stayton
    To: Tracy Huang Gmail ; docbook-apps@lists.oasis-open.org
    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
    bobs@sagehill.net


    ----- Original Message -----
    From: Tracy Huang Gmail
    To: docbook-apps@lists.oasis-open.org
    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
    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: ):





    <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">



    <sect1>



    <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'.







  • 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



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

    Posted 12-29-2010 13:47
    On 12/27/2010 08:32 PM, Tracy Huang Gmail wrote:
    > 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 (“ - left double
    > quote, ” - right double quote) in the xml file:

    To be clear, characters 147 and 148 are control characters; remember
    that all numeric references are to Unicode. They happen to be
    double-quotes in the Windows CP-1252 encoding, but that is not their
    meaning in an XML numeric reference.

    Instead, try using “ and ”.

    ~Chris
    --
    Chris Maden, text nerd <URL: http://crism.maden.org/ >
    Axial tilt: the reason for the season.
    GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319