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


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

Re: Creating CSS within XSL DocBook Stylesheets


/ David Parker <dlparker@facstaff.wisc.edu> was heard to say:
| Could kindly point me in the direction of the documentation on creating CSS 
| within XSL DocBook Stylesheets?

Well, you have basically two options:

1. You can add STYLE attributes to the transformations:

   <xsl:template match="...">
     <div style="font-size: 12pt;">
       ...
     </div>
   </xsl:template>

2. Or you can add CLASS attributes and use an external stylesheet.
   On the whole, this is probably the better approach.

   If you set the XSL variable html.stylesheet to the name of a stylesheet,
   The stylesheets will automatically add an appropriate link element
   to the head of each HTML document.

   <xsl:variable name="html.stylesheet">mystyle.css</xsl:variable>

                                        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.


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