> XML is purely for data  description, ie , no paragraph tags,
> no font tags, nothing.
>

Not to be a contrarian... but you *can* have formatting tags embedded in
your XML... they are parsed and placed into the result tree as any other tag
(see XHTML)... and then in your XSL template you simply need something like
below in order to retain the formatting:


<xsl: template match="/">
<!-- all of your html stuff up here -->
<xsl:apply-templates select="content_node"/>
<!-- other html stuff here too -->
</xsl:template>

        <xsl:template match="content_node/p | br | li | ul | b | i | td | tr |
table">
                <xsl:copy>
                        <xsl:for-each select="@*">
                                <xsl:copy/>
                        </xsl:for-each>
                        <xsl:apply-templates/>
                </xsl:copy>
        </xsl:template>

using <xsl:copy> simply tells the processor to just copy the nodes found in
the matching rule to the output

./dave

Reply via email to