docbook-apps

  • 1.  Problems generating custom class attributes

    Posted 01-25-2008 15:44
    Context:

    - XSLT processor: Saxon 6.5.5
    - DocBook XSL version: 1.73.2
    - XSL application : Website
    - DocBook version: 4.5

    I'm trying to apply the technique described in "DocBook XSL Complete guide"
    (4th edition) page 147 "Generate custom class values" for customizing
    <formalpara/title> element but I couldn't get any @class attribute in the
    HTML output. I've been trying with some other elements (like other


  • 2.  Re: [docbook-apps] Problems generating custom class attributes

    Posted 01-25-2008 17:14
    Pedro Pastor wrote:

    > In my customization layer I've inserted an exact copy of the template
    > presented in the book.
    >
    > Could anybody suggest what am I doing wrong?


    We don't all have a copy of 'page xxx'.
    Would you paste your customization here please?





    regards

    --
    Dave Pawson
    XSLT XSL-FO FAQ.
    http://www.dpawson.co.uk



  • 3.  RE: [docbook-apps] Problems generating custom class attributes

    Posted 01-25-2008 17:48

    Sorry Dave, I thought getting the "DocBOkk XSl" book was a fundamental
    requirement for joining the list ;-). </joke>

    <serious>
    Sorry, I should've made reference to the appropriate section of the HTML
    version:

    http://www.sagehill.net/docbookxsl/HtmlCustomEx.html#CustomClassValues


    Here you are the template I have included in my customization layer. I've
    tried the same template for different docbook elements (<formalpara>,


  • 4.  Re: [docbook-apps] Problems generating custom class attributes

    Posted 01-25-2008 19:03
    The "class.value" mode works when the element in question calls the
    "class.attribute" mode when it is forming its HTML output. Unfortunately,
    formalpara/title does not. Instead, it hardcodes . So you would need to
    customize the template in html/block.xsl that starts with:

    <xsl:template match="formalpara/title|formalpara/info/title">

    to output a instead, and add the mode="class.attribute" call to the
    span.

    Bob Stayton
    Sagehill Enterprises
    bobs@sagehill.net





  • 5.  RE: [docbook-apps] Problems generating custom class attributes

    Posted 01-26-2008 17:00
    Thank you very much Bob for your help.

    Pedro

    -----Mensaje original-----
    De: Bob Stayton [mailto:bobs@sagehill.net]
    Enviado el: viernes, 25 de enero de 2008 20:03
    Para: Pedro Pastor; docbook-apps@lists.oasis-open.org
    Asunto: Re: [docbook-apps] Problems generating custom class attributes

    The "class.value" mode works when the element in question calls the
    "class.attribute" mode when it is forming its HTML output. Unfortunately,
    formalpara/title does not. Instead, it hardcodes . So you would need to
    customize the template in html/block.xsl that starts with:

    <xsl:template match="formalpara/title|formalpara/info/title">

    to output a instead, and add the mode="class.attribute" call to the
    span.

    Bob Stayton
    Sagehill Enterprises
    bobs@sagehill.net