docbook-apps

  • 1.  Docbook and style

    Posted 07-27-2011 16:45
    Docbook is now used for many other uses than tech doc. With this come
    style requirements. Since db5 now uses Relax NG, which is easy to
    customize, is it possible to add a simple 'decorative' customization
    to add markup specifically for styling. E.g. Drop caps for the first
    letter of the first para of a chapter. Direct italics, rather than
    indirect via emphasis/@role. Specific styling/font directives for
    headings. Letting the stylesheet author know about font requirements
    etc, perhaps as metadata? Perhaps as <phrase font='xxx'>Some GreekI'm sure there are many more options

    With such markup, a simple customization layer could cater for the
    styling off that markup without putting any workload on the basic
    docbook styling.

    How much does this approach grate with classical docbook usage? I
    don't see that it need impact on any such usage. I can see the
    objection from the semantic markup only view, though those with that
    view need not make any use of the schema customization.

    It will be a fine line between markup for styling and styling itself.
    Until this is explored, I'm not really sure where those lines might
    be drawn?


    Comments? Support? Disapproval?
    What are your styling requirements at the markup level.


    regards

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




  • 2.  Re: [docbook-apps] Docbook and style

    Posted 07-28-2011 08:55
    Dnia sroda, 27 lipca 2011 o 18:44:37 davep napisal(a):
    > It will be a fine line between markup for styling and styling itself.
    > Until this is explored, I'm not really sure where those lines might
    > be drawn?

    Markup for styling: This text represents object Foo of type Bar.
    Styling itself: Let this text be hairy and upside-down.

    What is unobvious about that?

    I have seen declarations like ‘This text is of type green’, and the style applied was green text. While this may seem clumsy, it is still markup for styling. The taxonomy of objects and types used by the author is really up to the author; it is intractable to prefer some taxonomies over other ones. A better taxonomy would be more consistent, modular or easier to maintain; but that depends on the intended application.

    Now, semanticists frown upon such a declaration because they want to use the data to extract and manipulate information from the source text and therefore they need and advertise universal taxonomies. But not every text is amenable to semantic processing; in particular, works of art are for human consumption only. If we could use Docbook to produce a work of art, I am all for it. Producing a work of art requires the styling to be somewhat random, or at least unpredictable. This effect can be achieved by attaching an identifier to each element and applying style to that identifier (unless the style engine itself is the artist, which is also possible but rather futuristic). In this sense, a WYSIWYG editor (which is normally appropriate for creating a work of art) would be fully capable to separate markup and style.

    IMHO,
    Chris



  • 3.  Re: [docbook-apps] Docbook and style

    Posted 07-28-2011 08:56
    It is somewhat simplistic to say that DB5 can be easily customised with a
    simple customisation layer - some customisations for style are easy (and the
    stylesheets logical to follow), while others are frustratingly difficult
    because the logic changes (such as customising figure, table and example
    labels from the "en.xml" file rather than the relevant titlesheet xsl).

    I will start to customise PDFs for style quite a bit from now on, but I am
    more interested in how XSLT 2 will be incorporated into the next major
    release of DB.

    I think perhaps that the standard stylesheets will need to be substantially
    debugged if even the most eloquent customisations still fail to achieve the
    desired style results. I have come across this with trying to turn off a
    front cover for epub (I was able to customise only some parts of what I
    wanted - what I can't achieve through customisation comes down to buggy
    stylesheets.

    Dave Gardiner





  • 4.  Re: [docbook-apps] Docbook and style

    Posted 07-28-2011 11:21
    On 07/28/2011 09:56 AM, redlettucemail wrote:
    > It is somewhat simplistic to say that DB5 can be easily customised
    > with a simple customisation layer - some customisations for style are
    > easy (and the stylesheets logical to follow), while others are
    > frustratingly difficult because the logic changes (such as customising
    > figure, table and example labels from the "en.xml" file rather than
    > the relevant titlesheet xsl).
    I was referring to customization of the schema in relax NG.
    Then leaving the XSLT styling of that markup to customization of that layer.






    regards

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