This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: DocBook and HTML XSLT Formatting Q.


/ Michael Cortez <mcortez@fullcoll.edu> was heard to say:
| Any recommendation on what DocBook markup I should use to achieve the
| following type of output with the Standard XSL for HTML?
| 
| <p>
|   <b>Key</b>: Value<br/>
|   <b>Key</b>: Value<br/>
|   <b>Key</b>: Value<br/>
|   <b>Key</b>: Value<br/>
|   <b>Key</b>: Value<br/>
| </p>
| 
| Right now I'm using <formalpara> but makes the output "double spaced"; which
| isn't what I'm looking for.

There's probably nothing that produces quite that result. I'd probably
code this up as a variablelist myself. If I wanted precisely that
formatting, I'd give the list a role attribute and add a special
template to my customization layer.

<xsl:template match="variablelist[@role='key-value-list']">
  <p>
    <xsl:apply-templates mode="key-value-list"/>
  </p>
</xsl:template>

<xsl:template match="varlistentry" mode="key-value-list">
  <b>
    <xsl:apply-templates select="term"/>
  </b>
  <xsl:text>:</xsl:text>
  <xsl:apply-templates select="listitem/para/*">
  <hr/>
</xsl:template>

Untested :-)

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com>      | Things work out best for those who
http://www.oasis-open.org/docbook/ | make the best of the way things
Chair, DocBook Technical Committee | work out.

----------------------------------------------------------------
To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.oasis-open.org/ob/adm.pl>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]