|
List Info
Thread: Generating a toc.xml using eclipse.xsl
|
|
| Generating a toc.xml using eclipse.xsl |

|
2006-07-26 17:12:12 |
|
Hi,
I'm using the eclipse.xsl stylesheet to generate a toc.xml file for an
Eclipse help plugin. My source docbook XML files contain several books,
which I've merged into one book.xml file that defines several embedded
book elements and their entitities. I've succeeded in generating one
master toc.xml file. In my customized version of the eclipse.xsl, I set
the base.dir parameter to be "html", so all my HTML files are generated
into a child directory of html/ that corresponds to the particular book
name. However, in my generated toc.xml file, all hrefs are of the form
html/filename.html. I need the stylesheet to generate hrefs of the form
html/bookdirname/filename. How can I modify eclipse.xsl to generate the
correct href format, or do I need to modify my source XML files?
Should I be setting the base.dir param at all? Is there a way to concatenate the base.dir with the parent node of the filename?
Note that I use the "<?dbhtml
filename="bookdirname/filename.html"?>" chunking mechanism to
specify the output file for each section.
Regards
Christine Doyle
|
| Generating a toc.xml using eclipse.xsl |

|
2006-07-26 20:36:53 |
Christine Doyle wrote:
> Note that I use the "<?dbhtml
filename="bookdirname/filename.html"?>"
> chunking mechanism to specify the output file for each
section.
AFAIK you should use
<?dbhtml filename="filename.html"
dir="bookdirname"?>
instead. Does Eclipse stylesheet work with this form of
dbhtml PI?
--
------------------------------------------------------------
------
Jirka Kosek e-mail: jirka kosek.cz http://www.kosek.cz
------------------------------------------------------------
------
Profesionální školení a poradenství v oblasti technologií
XML.
Podívejte se na náš nově spuštěný web http://DocBook.cz
Podrobný přehled školení http://xmlguru.cz/skoleni/
------------------------------------------------------------
------
Nejbližší termíny školení:
** XSLT 23.-26.10.2006 ** XML schémata 13.-15.11.2006
**
** DocBook 11.-13.12.2006 ** XSL-FO 11.-12.12.2006 **
------------------------------------------------------------
------
http://xmlguru.cz Blog
mostly about XML for English readers
------------------------------------------------------------
------
|
|
| Generating a toc.xml using eclipse.xsl |

|
2006-07-28 15:29:42 |
|
Hi Jirka,
Thanks for your help. As you suggeste, I tried adding:
<?dbhtml dir="bookdirname" filename="filename.html"?>
and also made some customizations to the eclipse.xsl template to support the dbhtml processing instruction:
<xsl:variable name="get.dbhtml.dir">
<xsl:call-template name="dbhtml-dir"/>
</xsl:variable>
<!--Gets the filename attribute value from the dbhtml PI-->
<xsl:variable name="get.dbhtml.filename">
<xsl:call-template name="dbhtml-filename"/>
</xsl:variable>
<!--Adds the two variable values to generate the href path for the
toc.xml topic href-->
<xsl:variable name="concat.base.dir.dir.filename">
<xsl:value-of
select="concat($base.dir,$get.dbhtml.dir,$get.dbhtml.filename)"/>
</xsl:variable>
<toc label="{$title}"
topic="{$concat.base.dir.dir.filename}">
&n | |