docbook-apps

  • 1.  Syntax Highlighting in synopsis elements

    Posted 11-25-2008 10:24
    Dear docbook users,



    I use the xslthl.jar file to highlight my Java and XML programlistings
    and it works very well. I also generate an Appendix of my
    JavaDoc-Documentation with the dbdoclet(www.dbdoclet.org) and include
    it at the end of my document.

    In this Appendix, every class is written into a <classsynopsis> tag with
    <constructorsynopsis> and <methodsynopsis> child tags, but they are not
    highlighted although every tag has a language attribute, they just have
    the formatting of my monospace.verbatim.properties attribute-set!




    In Bob Stayton's "DocBook XSL: The Complete Guide" it says that
    "Highlighting works with programlisting, screen, and synopsis elements
    that have a language attribute.".


    Here you have an example of the structure:


    <classsynopsis class="class" language="java">


    <ooclass>


    <modifier>public</modifier>


    <classname>com.matrixware.xxxxxx.core.BaseBundle</classname>


    </ooclass>


    <classsynopsisinfo role="comment">// Public
    Constructors</classsynopsisinfo>


    <constructorsynopsis language="java">


    <modifier>public</modifier>


    <methodname>BaseBundle</methodname>


    <void/>


    </constructorsynopsis>


    <classsynopsisinfo role="comment">// Public
    Methods</classsynopsisinfo>


    <methodsynopsis language="java">


    <modifier>public</modifier>


    <type>void</type>


    <methodname>registerReadDataAccessor</methodname>



    <methodparam><type>java.lang.String</type><parameter>id</parameter></met
    hodparam>


    <methodparam><type>T extends
    <any></type><parameter>dataAccessor</parameter></methodparam>


    </methodsynopsis>


    </classsynopsis>


    What did I do wrong? Thanks in advance.

    Mathias




  • 2.  Re: [docbook-apps] Syntax Highlighting in synopsis elements

    Posted 11-25-2008 14:25
    Mathias Schindler wrote:

    > In Bob Stayton's "DocBook XSL: The Complete Guide" it says that
    > "Highlighting works with programlisting, screen, and synopsis elements
    > that have a language attribute.".

    But in your source there is no synopsis element, only classsynopsis etc.
    Generally syntax highlighting is working in "verbatim" elements. I
    suppose that in classsynopsis you can quite easily add highlighting by
    overriding templates for nested elements like ooclass, modifier, ...

    In theory syntax highlighting could be combined with the current
    classsynopsis code, but I'm not sure how well will highlighting fit into
    templates for nested elements. You can file new RFE at SourceForge site,
    so once developers have free time (;-)) they might try to implement this
    feature.

    Jirka

    --
    ------------------------------------------------------------------
    Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz
    ------------------------------------------------------------------
    Professional XML consulting and training services
    DocBook customization, custom XSLT/XSL-FO document processing
    ------------------------------------------------------------------
    OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
    ------------------------------------------------------------------




  • 3.  XREFs in table cells not hypenating

    Posted 11-26-2008 15:19
    Hi all,

    I'm using Docbook 5, Docbook XSL 1.73.2, and RenderX XEP. I've got the main hypenate parameter for my style sheets set to "true" and I've also hardcoded the hypenate="true" property into the inline element containing the output of the XREF element, and yet...not hypenating, not even breaking lines. Any ideas? A sample of the output FO is below:

    <fo:table-cell padding-left="2pt" padding-right="2pt" padding-top="2pt"
    padding-bottom="2pt" keep-with-previous="always"
    keep-with-next="always" wrap-option="wrap"
    border-bottom-width="0.5pt" border-bottom-style="solid"
    border-bottom-color="black" border-right-width="0.5pt"
    border-right-style="solid" border-right-color="black">
    <fo:block font-weight="bold" font-family="sans-serif"
    hyphenate="true" font-size="9pt" keep-with-next="always">
    <fo:block space-before.optimum="6pt" space-before.minimum="4pt"
    space-before.maximum="8pt"><fo:basic-link
    internal-destination="ae122848">
    <fo:inline hyphenate="true">Section 3.1, "Write Request"</fo:inline>
    </fo:basic-link> or <fo:basic-link
    internal-destination="ae132805">
    <fo:inline hyphenate="true">Section 3.4, "Stripe Write Request"</fo:inline>
    </fo:basic-link></fo:block>
    </fo:block>
    </fo:table-cell>

    Cheers,
    Jeff.




  • 4.  AW: [docbook-apps] Syntax Highlighting in synopsis elements

    Posted 11-27-2008 12:47
    Oops, I thought "synopsis" included all types of synopsis elements.

    Thank you for your answer!

    Mathias

    -----Ursprüngliche Nachricht-----
    Von: Jirka Kosek [mailto:jirka@kosek.cz]
    Gesendet: Dienstag, 25. November 2008 15:25
    An: Mathias Schindler
    Cc: docbook-apps@lists.oasis-open.org
    Betreff: Re: [docbook-apps] Syntax Highlighting in synopsis elements

    Mathias Schindler wrote:

    > In Bob Stayton's "DocBook XSL: The Complete Guide" it says that
    > "Highlighting works with programlisting, screen, and synopsis elements
    > that have a language attribute.".

    But in your source there is no synopsis element, only classsynopsis etc.
    Generally syntax highlighting is working in "verbatim" elements. I suppose that in classsynopsis you can quite easily add highlighting by overriding templates for nested elements like ooclass, modifier, ...

    In theory syntax highlighting could be combined with the current classsynopsis code, but I'm not sure how well will highlighting fit into templates for nested elements. You can file new RFE at SourceForge site, so once developers have free time (;-)) they might try to implement this feature.

    Jirka

    --
    ------------------------------------------------------------------
    Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz
    ------------------------------------------------------------------
    Professional XML consulting and training services
    DocBook customization, custom XSLT/XSL-FO document processing
    ------------------------------------------------------------------
    OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
    ------------------------------------------------------------------