docbook-apps

  • 1.  customize

    Posted 08-20-2009 21:42
    Hi,



    We publish technical articles which often contain blocks of source code.
    We are currently using <programlisting> for the source code.

    <programlisting>

    ...

    </programlisting>



    Now we want to add a title (with auto numbering) like Listing 1.
    Imagedisplay.php. I looked at docbook documentation, and the closest tag
    I can find is <example>



    <example><programlisting>..</programlisting>



    The problem is that it displays Example. We can go into the XSL to
    change all of them to Listing, but doing this will conflict with
    existing <example> block.



    I noticed that <example> has an attribute of label. So is it possible to
    change the caption of example to the value of label attribute?



    I just started to learn XSLT. Thanks.