I made some tags for bold, italics, and so on in XML using XSL, except I can't get them to over-lap like HTML will do. For example:
Quote:
|
This is <bold>special</bold> text
|
...shows up as...
...but the following example...
Quote:
|
This is <ital>very <bold>special</bold></ital> text
|
...shows up as...
Quote:
|
This is very special text
|
...instead of the hoped:
Quote:
|
This is very special text
|
Any ideas? Anything would be useful, even a recomendation to another forum would help.
Thanks,
- Keith
(Here's my code)
Quote:
<xsl:template match="content/page/paragraph"><xsl:choose><xsl:when test="@type = 'textonly'"><xsl:if test="@title != ''"><p class="content_body_right_subtitle"><xsl:value-of select="@title"/></p> </xsl:if>
<p class="content_body_right_text"><xsl:apply-templates/></p> </xsl:when>
<xsl:when test="@type = 'list'"><xsl:if test="@image != ''"><img src="{@image}" alt="" style="margin-right:15px; margin-bottom:15px; float:right;" /> </xsl:if>
<xsl:apply-templates select="list"/> </xsl:when>
<xsl:otherwise><xsl:if test="@title != ''"><p class="content_body_right_subtitle"><xsl:value-of select="@title"/></p> </xsl:if>
<p class="content_body_right_text"><img src="{@image}" alt="" style="margin-left:15px; margin-bottom:15px; float:right;" /><xsl:value-of select="."/></p> </xsl:otherwise> </xsl:choose> </xsl:template>
<xsl:template match="content/page/paragraph/bold"><strong><xsl:apply-templates/></strong><xsl:text> </xsl:text> </xsl:template>
<xsl:template match="content/page/paragraph/ital"><i><xsl:apply-templates/></i><xsl:text> </xsl:text> </xsl:template> |