xsl-list
[Top] [All Lists]

Re: [xsl] Dynamically Creating HTML Links, actual snippet

2006-11-30 09:11:38
Here is what I'm trying to do. Given the following:


<?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" -->

        </div>
    </xsl:template>
</xsl:stylesheet>



--- Rashmi Rubdi <dev_subscriptions(_at_)yahoo(_dot_)com> wrote:

I'm trying to understand a bit more from the snippet
provided below.

Are you trying to extract the last 2 words from the
<stuff> node and then trying to concatinate them
like slide01 and then appending .html to slide01 ?

----- Original Message ----
From: raven <ra5en2000(_at_)yahoo(_dot_)com>
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Sent: Monday, November 27, 2006 1:35:17 PM
Subject: [xsl] Dynamically Creating HTML Links


I would like to dynamically use XSLT (spec 1.0) to
go
through a nodeset and automatically generate HTML
links incrementally to the next nodeset. For
example,
if I have

<slide>
<stuff>stuff on slide 1</stuff>
</slide>

<slide>
<stuff>stuff on slide 2</stuff>
</slide>

<slide>
<stuff>stuff on slide 3</stuff>
</slide>

I would want the outgoing HTML to have an <a
href="slide02.html"> on the slide 1 page, and so
forth. Is there a code snippet to do this?

Thank you.

Filipp Sapienza


 

____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited


--~------------------------------------------------------------------
XSL-List info and archive: 
http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to:
http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--







 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--