On 02/27/2012 02:35 PM, Jirka Kosek wrote:
>
> for XHTML based outputs each topic produces usually one HTML page which
> inherits it's filename from original DITA source file.

There are several DITA attributes which allow to control this. See
http://docs.oasis-open.org/dita/v1.2/os/spec/archSpec/chunking.html#chunking



> This has one big
> drawback -- there is no fixed filename like index.html which can be
> always used to start browsing documentation.

Excerpts from one of our ditamaps:

---
   <frontmatter>
     <booklists>
       <toc chunk="to-content" copy-to="index.html"/>

       <figurelist chunk="to-content"/>

       <tablelist chunk="to-content"/>
     </booklists>

     <bookabstract chunk="to-content"
                   href="introduction.dita" id="intro"/>
   </frontmatter>
---

Notice the copy-to="index.html".




>
> I have solved this by doing simple customization below, but it would be
> nice if similar feature will be default.

You are right, but using fixed name "index.html" somewhat conflicts with 
the above DITA feature.

However what you did works fine because you'll have *both* 
original_name.html (possibly  with links from the other HTML pages 
pointing to original_name.html) and index.html which is a logical copy 
of original_name.html.

Therefore our answer is: we need to find the right way to implement your 
RFE.




>
>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>    xmlns:xs="http://www.w3.org/2001/XMLSchema";
> xmlns:u="http://www.xmlmind.com/namespace/ditac";
>    xmlns:ditac="http://www.xmlmind.com/ditac/schema/ditac";
>    xmlns:Number="java:com.xmlmind.ditac.xslt.Number"
>    exclude-result-prefixes="xs u ditac Number" version="2.0">
>
>    <xsl:import href="ditac-xsl:webhelp/webhelp.xsl"/>
>
>    <xsl:template match="/">
>      <xsl:for-each select="$ditacLists/ditac:chunkList/ditac:chunk[1]">
>        <xsl:result-document href="index.html">
>          <html>
>            <head>
>              <title>Documentation is opening</title>
>            </head>
>            <body>
>              <script>
>                location.href = '<xsl:value-of select="@file"/>';
>              </script>
>            </body>
>          </html>
>        </xsl:result-document>
>      </xsl:for-each>
>
>      <xsl:apply-imports/>
>    </xsl:template>
>
> </xsl:stylesheet>
>
 
--
XMLmind DITA Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/ditac-support

Reply via email to