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: Customizing


Hi!

For testing, I made a copy of the javahelp.xsl, and then I made my
customizing in the copy of the original file. Now this file works fine for
me, but I think, I have to make my customizing how described in the manual
(http://sagehill.net/docbookxsl/CustomMethods.html#WriteCustomization).

I must replace some block oft he original file with my changes. So I created
a file how described in the manual, and tried to make my transformation, but
this didn't work. There are strange errors, like 'directory not found'.

For example:


ORIGINAL TEXT BLOCK:

<!-- ====================================================================
-->

<xsl:template name="helpset">
  <xsl:call-template name="write.chunk.with.doctype">
    <xsl:with-param name="filename"
select="concat($base.dir,'jhelpset.hs')"/>
    <xsl:with-param name="method" select="'xml'"/>
    <xsl:with-param name="indent" select="'yes'"/>
    <xsl:with-param name="doctype-public" select="'-//Sun Microsystems
Inc.//DTD JavaHelp HelpSet Version 1.0//EN'"/>
    <xsl:with-param name="doctype-system"
select="'http://java.sun.com/products/javahelp/helpset_1_0.dtd'"/>
    <xsl:with-param name="content">
      <xsl:call-template name="helpset.content"/>
    </xsl:with-param>
  </xsl:call-template>
</xsl:template>

<xsl:template name="helpset.content">
  <xsl:variable name="title">
    <xsl:apply-templates select="." mode="title.markup"/>
  </xsl:variable>

  <helpset version="1.0">
    <title>
      <xsl:value-of select="normalize-space($title)"/>
    </title>

    <!-- maps -->
    <maps>
      <homeID>top</homeID>
      <mapref location="jhelpmap.jhm"/>
    </maps>

    <!-- views -->
    <view>
      <name>TOC</name>
      <label>Table Of Contents</label>
      <type>javax.help.TOCView</type>
      <data>jhelptoc.xml</data>
    </view>

    <view>
      <name>Index</name>
      <label>Index</label>
      <type>javax.help.IndexView</type>
      <data>jhelpidx.xml</data>
    </view>

    <view>
      <name>Search</name>
      <label>Search</label>
      <type>javax.help.SearchView</type>
      <data
engine="com.sun.java.help.search.DefaultSearchEngine">JavaHelpSearch</data>
    </view>
  </helpset>
</xsl:template>

<!-- ====================================================================
-->


MY VERSION:

<!-- ====================================================================
-->

  <xsl:template name="helpset">
    <xsl:call-template name="write.chunk.with.doctype">
      <xsl:with-param name="filename"
select="concat($base.dir,'jhelpset_',$language,'.hs')"/>
      <xsl:with-param name="method" select="'xml'"/>
      <xsl:with-param name="indent" select="'yes'"/>
      <xsl:with-param name="doctype-public"
        select="'-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version
2.0//EN'"/>
      <xsl:with-param name="doctype-system"
        select="'http://java.sun.com/products/javahelp/helpset_2_0.dtd'"/>
      <xsl:with-param name="content">
        <xsl:call-template name="helpset.content"/>
      </xsl:with-param>
    </xsl:call-template>
  </xsl:template>

  <xsl:template name="helpset.content">
    <xsl:variable name="title">
      <xsl:apply-templates select="." mode="title.markup"/>
    </xsl:variable>

    <helpset version="2.0">
      <title>
        <xsl:value-of select="normalize-space($title)"/>
      </title>

      <!-- maps -->
      <maps>
        <homeID>book</homeID>
        <mapref location="jhelpmap.jhm"/>
      </maps>

      <!-- views -->
      <view>
        <name>TOC</name>
        <label>Table Of Contents</label>
        <type>javax.help.TOCView</type>
        <data>jhelptoc.xml</data>
      </view>

      <view>
        <name>Index</name>
        <label>Index</label>
        <type>javax.help.IndexView</type>
        <data>jhelpidx.xml</data>
      </view>

      <view>
        <name>Search</name>
        <label>Search</label>
        <type>javax.help.SearchView</type>
        <data
engine="com.sun.java.help.search.DefaultSearchEngine">JavaHelpSearch</data>
      </view>

      <view>
        <name>Favorites</name>
        <label>Favorites</label>
        <type>javax.help.FavoritesView</type>
      </view>

      <!-- presentation -->
      <presentation xml:lang="{$language}" default="true"
displayviews="true"
        displayviewimages="true">
        <name>default</name>
        <size width="640" height="480"/>
        <location x="200" y="200"/>
        <title>
          <xsl:value-of select="normalize-space($title)"/>
        </title>
        <toolbar>
          <helpaction>javax.help.BackAction</helpaction>
          <helpaction>javax.help.ForwardAction</helpaction>
          <helpaction>javax.help.HomeAction</helpaction>
          <helpaction>javax.help.PrintAction</helpaction>
          <helpaction>javax.help.PrintSetupAction</helpaction>
          <helpaction>javax.help.ReloadAction</helpaction>
          <helpaction>javax.help.SeparatorAction</helpaction>
        </toolbar>
      </presentation>
    </helpset>
  </xsl:template>

  <!-- ====================================================================
-->

Please can anyone explain, how my file must look like, to replace this code
from the original file with my version?

Thanks,
Christian.



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