[xsl] Newbie: Embedding styles in XML blocks

Subject: [xsl] Newbie: Embedding styles in XML blocks
From: Arne Claassen <xsl@xxxxxxxxxxxx>
Date: 24 Sep 2003 09:23:21 -0700
I'm relatively new to XSL, trying to ween myself of customer HTML
templating solutions. There's a fairly simple issue i've run into a
couple of times, which is embedding simple style controls in a paragraph
of XML data, such as:

<para>This is an <i>important</i> paragraph</para>

These are the ways i've tried to render it
<xsl:template match="para">
  <p><xsl:value-of select="."/></p>
..which strips out the <i>.

<xsl:template match="para">
  <p><xsl:value-of select="*"/></p>
..which displays only the contents of <i>

<xsl:template match="para">
  <p><xsl:value-of select="*"/></p>
..which displays everything inclusing the enclosing <para>
I know, i know, i now have HTML in my XML, so of course i'm open to a
solution that does text styling in the proper XSL fashion (which i don't
know right).

I just don't want to resort to using <![CDATA[ ]]> for all my text
chunks that have styling embedded


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

Current Thread