Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: How can I include the attribute?

From: "Zhou Lei" <dark_eaglet@-------.--->
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! :-)




transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent