Subject: Re: [xsl] Dynamically Creating HTML Links, actual snippet From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Thu, 30 Nov 2006 11:58:41 -0500 |
<?xml version="1.0" encoding="ISO_8859-1"?>
<show>
<slide> <heading>Dog hobbies</heading> <contents>The dog likes to watch television.</contents> </slide>
<slide> <heading>Dog food</heading> <contents>The dog likes to eat Kenlration.</contents> </slide>
<slide> <heading>Dog sleeping</heading> <contents>The dog likes to sleep on the bed.</contents> </slide>
</show>
and the following. . .
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html" encoding="ISO_8859-1"/> <!-- DEFINE THE DOCUMENT LEVEL TEMPLATE --> <xsl:include href="basichtmlformatting.xsl"/> <xsl:template match="slide"> <div class="about"> <xsl:apply-templates/>
<!-- what do I do here to create an html link from each slide to the next slide? something of the format "slide01.html" -->
<xsl:variable name="next-slide-filename"> <xsl:apply-templates select="following-sibling::slide" mode="filename"/> </xsl:variable>
<div class="navbar"> <a href="{$next-slide-filename}">Next</a> </div>
... </xsl:template>
<xsl:template match="slide" mode="filename"/> <xsl:text>slide</xsl:text> <xsl:number format="01"/> <xsl:text>.html</xsl:text> </xsl:template>
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Dynamically Creating HTML, raven | Thread | Re: [xsl] Dynamically Creating HTML, Wendell Piez |
Re: [xsl] The T word, Wendell Piez | Date | Re: [xsl] Dynamically Creating HTML, Wendell Piez |
Month |