xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Curdt <tcu...@apache.org>
Subject Re: How to surround an element with efficacity ?
Date Tue, 09 Nov 2004 00:25:21 GMT
xmlizer wrote:
> Hello
> 
> As I am writing XSLT documents, i was in a some case in this situation :
> 
> In one case, i want to surround an element with another one, in another 
> case i don't
> 
> example :
> 
> if (@LINKED=='true') {
>     <a href="....">
>         content
>     </a>
> } else {
>     content
> }

What about

<xsl:template match="whatever[@LINKED='true']">
   <a href="...">
     content
   </a>
</xsl:template>

<xsl:template match="whatever">
   content
</xsl:template>

cheers
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Mime
View raw message