Altova Mailing List Archives


Re: How to format an embedded tag's content

From: clara@-----------.---------.---
To: NULL
Date: 3/28/2008 7:01:00 AM

Hi Martin,

I usually use <xsl:value-of select="."> to output a tag's content, what' s 
the different between<xsl:value-of select="."> and<xsl:apply-templates />?

Clara
-- 
thank you so much for your help


"Martin Honnen" wrote:

> clara wrote:
> 
> > I have an xml section like this:
> > 
> > ...
> > <summary>
> >  this year we earn <benefit>5,000</benefit> dollars,....
> > 
> > 
> > </summary>
> > ...
> > in the declaration part 
> > 
> > <!ELEMENT summary ANY >
> > 
> > I am using XSLT to output the xml file to HTML format, how can I output the 
> > whole summary section and only make the 5,000 green color.
> 
>    <xsl:template match="summary">
>      <p><xsl:apply-templates/></p>
>    </xsl:template>
> 
>    <xsl:template match="benefit">
>      <span style="color: green;">
>        <xsl:apply-templates/>
>      </span>
>    </xsl:template>
> 
> -- 
> 
> 	Martin Honnen --- MVP XML
> 	http://JavaScript.FAQTs.com/
> 

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.