This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Creating a cdata section using xsl


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]