OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook-apps] A Few Stylesheet Title Customization Problems


>> 

docbook-rnc-5.0cr1 xsl-1.72.0 oxygen-8.1.0 (eclipse-3.2.1 plugin)

 

As I put the finishing touches on the enterprise …/xhtml/profile-chunk.xsl stylesheet customizations (css conformance) I have encountered a few  title problems:

 

<xsl:template name="division.title">

      <!-- set, book, part -->

      <xsl:param name="node" select="."/>

      <p>

         <xsl:attribute name="class">page-title</xsl:attribute>

         <xsl:call-template name="anchor">

            <xsl:with-param name="node" select="$node"/>

            <xsl:with-param name="conditional" select="0"/>

         </xsl:call-template>

         <xsl:apply-templates select="$node" mode="object.title.markup">

            <xsl:with-param name="allow-anchors" select="1"/>

         </xsl:apply-templates>

      </p>

</xsl:template>

 

No equivalent division.subtitle; additionally, unable to successfully wrap division.title as with component.title/component.subtitle.

 

 

The templates:

 

<xsl:template match="partintro/title" mode="partintro.title.mode">

  <h2>

    <xsl:apply-templates/>

  </h2>

</xsl:template>

 

and

 

<xsl:template match="partintro/subtitle" mode="partintro.title.mode">

  <h3>

    <i><xsl:apply-templates/></i>

  </h3>

</xsl:template>

 

transform to <h1> elements regardless of <h2> and <h3> or applying css-conformant elements.

 

<xsl:template name="component.title">

      <!-- dedication, preface, chapter, appendix, article, bibliography, glossary, index -->

      <xsl:comment>START: PAGE TITLE AREA</xsl:comment>

      <p class="page-title">

         <xsl:apply-imports/>

      </p>

      <xsl:comment>END: PAGE TITLE AREA </xsl:comment>

 </xsl:template>

 

The above template does not work with partintro titles and the dedication body implements the same page-title class as the dedication title.

 

<xsl:template name="component.subtitle">

      <!-- dedication, preface, chapter, appendix, article, bibliography, glossary, index -->

      <xsl:comment>START: PAGE SUBTITLE AREA</xsl:comment>

      <p class="foo-large">

         <xsl:apply-imports/>

      </p>

      <xsl:comment>END: PAGE SUBTITLE AREA </xsl:comment>

</xsl:template>

 

Same issues as with component.title.

 

 

A couple of suggestions:

1)  templates division.title/division.subtitle should behave as component.title/component.subtitle: a simple wrapper to replace the <h1>, <h2> and <h3> tags with the css classes.

2) role attributes be applied to <title> elements similar to <para> and <phrase> to allow overriding with css classes.

 

 

If I am incorrectly selecting, extending or overriding templates please advise.

 

>> 

 

Neglected to include

 

<xsl:template name="section.heading">

      <!-- sect1, sect2, sect3, sect4, sect5, section -->

      <xsl:comment>START: PAGE TITLE AREA</xsl:comment>

      <p class="page-title">

         <xsl:apply-imports/>

      </p>

      <xsl:comment>END: PAGE TITLE AREA </xsl:comment>

 </xsl:template>

 

 

division.title, component.title, component.subtitle and section.heading form the title customizations required for enterprise css conformance.

 

Again, would like to see division.title and section.heading follow component.title/component.subtitle as division.title/division.subtitle and section.heading as section.title/section.subtitle with the capability to replace (not wrap) the <Hx> tags with css classes with a simple apply-imports wrap.

 

Perhaps stringparms along the lines of generate.toc in the form of title.css.styles would be the most convenient; one could apply or override css class styles to each title element in the list.

 

Other non-title presentation elements on the wish list include <emphasis> and <emphasis role=strong> represented as css classes (in my case, foo.emphasis and foo.strong) in lieu of <i> and <b> but that’s for another time.

 

As one can tell, I’d like to see DocBook stylesheets evolve to support enterprise css requirements resulting in more acceptance and utilization in that environment.

 

Ray

 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]