List Info

Thread: Generating a toc.xml using eclipse.xsl




Generating a toc.xml using eclipse.xsl
user name
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
user name
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: jirkakosek.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
user name
2006-07-28 15:29:42
Hi Jirka,
Thanks for your help. As you suggeste, I tried adding:
&lt;?dbhtml dir="bookdirname" filename=&quot;filename.html&quot;?>
&nbsp;
and also made some customizations to the eclipse.xsl template to support the dbhtml processing instruction:

 ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; <xsl:variable name=";get.dbhtml.dir"&gt;
   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; <xsl:call-template name=";dbhtml-dir"/>
 &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;  &lt;/xsl:variable>
&nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; <!--Gets the filename attribute value from the dbhtml PI-->
  ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   <xsl:variable name=";get.dbhtml.filename&quot;>
&nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ;  <;xsl:call-template name=";dbhtml-filename"/>
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; </xsl:variable&gt;

 ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; <!--Adds the two variable values to generate the href path for the toc.xml topic href-->
 &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;  &lt;xsl:variable name=";concat.base.dir.dir.filename&quot;>
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; <xsl:value-of select=&quot;concat($base.dir,$get.dbhtml.dir,$get.dbhtml.filename)"/&gt;
 &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;  </xsl:variable>
 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   
&nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;  <toc label=&quot;{$title}&quot; topic="{$concat.base.dir.dir.filename}"
 &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;  <xsl:apply-templates select=&quot;/*/*&quot; mode=";etoc"/>
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; </toc>
It seems to work for me.

Regards
Christine Doyle


On 7/26/06, Jirka Kosek <kosek.cz">jirkakosek.cz&gt; wrote:
Christine Doyle wrote:

&gt; Note that I use the "<?dbhtml filename=&quot;bookdirname/filename.html&quot;?>&quot;
> chunking mechanism to specify the output file for each section.

AFAIK you should use

<?dbhtml filename=&quot;filename.html&quot; dir="bookdirname"?>

instead. Does Eclipse stylesheet work with this form of dbhtml PI?

--
------------------------------------------------------------------
  ; Jirka Kosek ; &nbsp;  e-mail: kosek.cz">jirkakosek.cz&nbsp;   ; http://www.kosek.cz
------------------------------------------------------------------
 &nbsp; Profesionální školení a poradenství v oblasti technologií XML.
&nbsp; &nbsp; &nbsp; Podívejte se na náš nově spuštěný web http://DocBook.cz
&nbsp; &nbsp;   ; &nbsp;Podrobný přehled školení http://xmlguru.cz/skoleni/
------------------------------------------------------------------
&nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; Nejbližší termíny školení:
&nbsp;   ; ** XSLT 23.-26.10.2006 ** XML schémata 13.-15.11.2006 **
 &nbsp;   ; ** DocBook 11.-13.12.2006 ** XSL-FO 11.-12.12.2006 **
------------------------------------------------------------------
   http://xmlguru.cz&nbsp; &nbsp; Blog mostly about XML for English readers
------------------------------------------------------------------




Generating a toc.xml using eclipse.xsl
user name
2006-07-28 16:04:28
Christine Doyle wrote:

> and also made some customizations to the eclipse.xsl
template to support 
> the
> dbhtml processing instruction:

It did not work without this customization? I thought that
it should, 
because href.target.with.base.dir template should honor
<?dbhtml 
instructions.

-- 
------------------------------------------------------------
------
   Jirka Kosek     e-mail: jirkakosek.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
------------------------------------------------------------
------

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )