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] Adding content to div class="article"

This seems similar to what I need to accomplish in my project, where I use a book element. What I wound up doing was copying the book template into my customization layer and adding all of my stuff around it. So something like this:

<!-- Wrap <book> in the custom page divs -->
<xsl:template match="d:book">
  <xsl:call-template name="id.warning"/>

<!-- add bunches and bunches of stuff -->

<!-- unmodified core of <book> template -->

    <xsl:apply-templates select="." mode="common.html.attributes"/>
    <xsl:if test="$generate.id.attributes != 0">
      <xsl:attribute name="id">
        <xsl:call-template name="object.id"/>

    <xsl:call-template name="book.titlepage"/>

    <xsl:apply-templates select="d:dedication" mode="dedication"/>
    <xsl:apply-templates select="d:acknowledgements" mode="acknowledgements"/>

    <xsl:variable name="toc.params">
      <xsl:call-template name="find.path.params">
        <xsl:with-param name="table" select="normalize-space($generate.toc)"/>

    <xsl:call-template name="make.lots">
      <xsl:with-param name="toc.params" select="$toc.params"/>
      <xsl:with-param name="toc">
        <xsl:call-template name="division.toc">
          <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>


<!-- add bunches of other stuff -->

</xsl:template><!-- close the modified book template-->

<!-- other templates related to book -->

<xsl:template match="d:book/d:bookinfo"/>
<xsl:template match="d:book/d:info"/>
<xsl:template match="d:book/d:title"/>
<xsl:template match="d:book/d:titleabbrev"/>
<xsl:template match="d:book/d:subtitle"/>

 <!-- rest of customization layer -->

The result is here:


(an oh-so-incomplete draft of a software manual)

There are probably easier, better ways, but this is what my benighted mind came up with.

Good luck!


Mike Broschinsky
Administrative Code Editor
Utah State Division of Administrative Rules
Because of the governor's "Working 4 Utah" initiative, office hours for the Division of Administrative Rules are 7 a.m. to 6 p.m., Monday through Thursday. The Division is closed on Friday.
>>> robert <rp.info@gmail.com> 3/9/2010 5:44 AM >>>

I use Docbbok to create online help. Each HTML page corresponds to a single
article. My customization layer uses templates like user.footer.navigation
or user.header.navigation. However, that's not enough to properly lay out
the contents of a page. My custom XSL transforms must add some div elements
inside the div class="article" element. How can I do that?

Or, is there a way to wrap the whole div class="article" element is some
other div?


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