wrote:
> Morning all,
> Just started out with XSL.
> Now working on my first example I have the following XML structure
>
> <topLevel>
> <repeatLevel name="hello" type="hello">
> <![CDATA[sometext in here]]>
> </repeatLevel>
> <repeatLevel name="hello2" type="hello2">
> <![CDATA[more text in here]]>
> </repeatLevel>
> </topLevel>
>
> Now developing the XSL is going fine, I have an html table with three
> columns and been able to output the name and type but I cannot get the
> CDATA's text in the third column.
>
> Is this possible?
Sure, why not? In the XSLT/XPath data model there are no CDATA sections
anyway, the repeatLevel elements simply have a string value so you can
do e.g.
<xsl:template match="repeatLevel">
<tr>
<td><xsl:value-of select="@name"/></td>
<td><xsl:value-of select="@type"/></td>
<td><xsl:value-of select="."/></td>
</tr>
</xsl:template>
Or with additonal templates you do e.g.
<xsl:template match="repeatLevel">
<tr>
<xsl:apply-templates select="@* | node()"/>
</tr>
</xsl:template>
<xsl:template match="repeatLevel/@* | repeatLevel/text()">
<td>
<xsl:value-of select="."/>
</td>
</xsl:template>
--
Martin Honnen
http://JavaScript.FAQTs.com/