Re: How to surround an element with efficacity ?

Torsten Curdt <[email protected]>
Newsgroups gmane.text.xml.general
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.