![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: How can I include the attribute? [Thread Next] Re: How can I include the attribute?To: NULL Date: 3/1/2005 3:30:00 AM
"Joris Gillis" <roac@p...> дÈëÓʼþ
news:opsmw5pxvyyf9v9r@n......
> Tempore 18:24:34, die Monday 28 February 2005 AD, hinc in foro
{comp.text.xml} scripsit Zhou Lei <dark_eaglet@h...>:
>
> > <user login="loginname">
> > <name>James Cook</name>
> > </user>
> >
> > I need to include the login attribute value in my target HTML file, and
> > concatenate the value with @my.addr.com. So my target HTML code will be
> >
> > <a href="mailto:loginname@m...">
> > James Cook
> > </a>
>
> You can use:
> a) an attribute value template:
> <xsl:template match="user">
> <a href="mailto:{@login}@my.addr.com">
> <xsl:apply-templates/>
> </a>
> </xsl:template>
>
> or b)explicit attribute node creation:
> <xsl:template match="user">
> <a>
> <xsl:attribute name="href">
> <xsl:text>mailto:</xsl:text>
> <xsl:apply-templates select="@login"/>
> <xsl:text>@my.addr.com</xsl:text>
> </xsl:attribute>
> <xsl:apply-templates/>
> </a>
> </xsl:template>
>
>
>
> regards,
> --
> Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041)
> Fiat W3C in tenebris
Thank you and Martin very much it works! :-)
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
