|
Subject: [xsl] can templates be nested? From: "dmitri kerievsky" <dmitrik@xxxxxxxxxxxxxx> Date: Sat, 15 Jun 2002 22:08:04 -0400 |
question is how to transfer the mailto value:
<xsl:template match="catalog/artist/album/label/person">
<a href="{concat('mailto:', @email)}"> <xsl:value-of select="@name"/>
</a>
</xsl:template>
into this template between a <td></td> :
<xsl:template match="track" mode="TrackDetailForAlbum">
<tr>
<xsl:if test="position() mod 2">
<xsl:attribute name="bgcolor">white</xsl:attribute>
</xsl:if>
<!--<td><xsl:number/></td>-->
<td>
<xsl:value-of select="."/>
<xsl:if test="@alternateTake = 'true'"> (alternate take)</xsl:if>
</td>
<!--<td align="left"><xsl:value-of select=@track"/></td> -->
<td align="right"><xsl:value-of select="@address"/></td>
<td align="right"><xsl:value-of select="@telephone"/></td>
<td align="right"><xsl:value-of select="@web"/></td>
<td align="right"><xsl:value-of select="@paglgroup"/></td>
</tr>
</xsl:template>
this .xml has changed from:
<catalog>
<artist>
<name>Miles Davis</name>
<album>
<title>Plays Classic Ballads</title>
<label>CBS</label>
<track time="7:56">Bye Bye Blackbird</track>
into:
<catalog>
<artist>
<name>m ii</name>
<album>
<title>NY</title>
<label></label>
<track address="1 main street" telephone="(3333" email="e@xxxxxxx" web=""
group="yes"> joe doe</track>
the idea was to have the track name appear as hyperlink with
mailto:e@xxxxxxxx The top template
works by itself, but how to include that function inside the track template?
Any ideas?
Thanks,
Dmitri
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] error, base pathname, Jonathan Furrer | Thread | Re: [xsl] can templates be nested?, Joerg Heinicke |
| Re: [xsl] error, base pathname, Jonathan Furrer | Date | RE: [xsl] trying to load xml and xs, Max Dunn |
| Month |