Re: [xsl] Creating a cdata section using xsl

Subject: Re: [xsl] Creating a cdata section using xsl
From: Arnaud Vandyck <arnaud@xxxxxxxxxxxxxxxxx>
Date: Tue, 27 Feb 2001 16:49:57 +0100 (CET)
On Tue, 27 Feb 2001, David Carlisle wrote:

> 
>   For example, given the source document:
> 
>   <person>
>       <name>John Doe</name>
>   </person>
> 
> <xsl:template match="/">
> <doc>
> <display>
>   <xsl:apply-templates/>
> </display>
> </doc>
> </xsl:template>
> 
> <xsl:template match="person">
> &lt;html&gt;
>   <xsl:apply-templates/>
> &lt;/html&gt;
> </xsl:template>
> 
> <xsl:template match="name">
> &lt;body&gt;
>   <xsl:apply-templates/>
> &lt;/body&gt;
> </xsl:template>

Why don't you use the <xsl:element> tag?

<xsl:template match="person">
  <xsl:element name="html">
    <xsl:apply-templates/>
  </xsl:element>
</xsl:template>

-- Arnaud


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread