2009年11月8日日曜日

JBossのテンプレートでDocBook - (4/8) -

DocBook HTMLテンプレートを編集する

ページヘッダーに表示されるイメージとリンクを変更します。

『resources/j-docbook-xslt/xslt/org/jboss』フォルダーにある『xhtml.xsl』ファイルと『xhtml-common.xsl』ファイルを編集します。

xhtml.xsl
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  ...
  <!--<xsl:import href="http://docbook.sourceforge.net/release/xsl/1.72.0/xhtml/chunk.xsl"/>-->
  <xsl:import href="file:///C:/mybook/resources/docbook-xsl-1.75.2/xhtml/chunk.xsl"/>
  ...
DocBookスタイルシートのパスをローカルファイルに変更します。

xhtml-common.xsl
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ...
  ...
  <!--<xsl:param name="siteHref" select="'http://www.jboss.org'"/>-->
  <!--<xsl:param name="docHref" select="'http://docs.jboss.org/'"/>-->
  <!--<xsl:param name="siteLinkText" select="'JBoss.org'"/>-->
  <!--<xsl:param name="docLinkText" select="'Community Documentation'"/>-->
  <xsl:param name="siteHref" select="'#'"/>
  <xsl:param name="docHref" select="'#'"/>
  <xsl:param name="siteLinkText" select="'MyHost'"/>
  <xsl:param name="docLinkText" select="'MyHost Documentation'"/>
  ...
  <!-- Set chunk.section.depth to 0 to just chunk chapters. -->
  <!--<xsl:param name="chunk.section.depth" select="0"/>-->
  <xsl:param name="chunk.section.depth" select="5"/>
  ...
ヘッダーリンクを変更します。
パラメータを変更してセクションごとにファイルを分割します。(5階層まで)



『resources/j-docbook-style/css/css』フォルダーにある 『documentation.css』ファイルを編集します。

documentation.css
...
#title a.site_href {
  display:block;
  height:89px;
  width:310px;
  float:left;
  /* background:url(../images/community/jbossorglogo.png) top left no-repeat; */
}

#title a.doc_href {
  display:block;
  height:89px;
  /* background:transparent url(../images/community/community_doc.png) top right no-repeat; */
}
...
ヘッダーイメージを削除します。または、差し替える場合はファイルパスを変更します。