I can get the paragraph numbers to show up by adding it to the paragraph
template
<xsl:template match="paragraph">
<font class="para-num"><xsl:value-of
select="@num"/></font><xsl:apply-templates/>
</xsl:template>
But to be able to apply the correct formatting to the various new p tags
created by the transformation, I need to add at least two different classes.
(1) to the paragraph within the blockquote (to remove the indent that is
applied to other paragraphs and to account for the decreased line-height
that blockquotes get) and (2) to the new false paragraphs (to remove the
indent that would be applied following the blockquote).
So, even though the XSL code works, it introduces some of the same problems
that IE6 caused to the original XHTML blockquote-as-child-object problem.
From: James Fuller <jim(_dot_)fuller(_at_)ruminate(_dot_)co(_dot_)uk>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
ok apply the following to your above xml
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="html" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<!-- Transform -->
<xsl:variable name="result">
<xsl:apply-templates select="paragraph"/>
</xsl:variable>
<!-- Display Results -->
<xsl:copy-of select="$result"/>
</xsl:template>
<xsl:template match="text()">
<xsl:if test="normalize-space()">
<p><xsl:value-of select="normalize-space(.)"/></p>
</xsl:if>
</xsl:template>
<xsl:template match="paragraph">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="italic">
<i>
<xsl:value-of select="."/>
</i>
</xsl:template>
<xsl:template match="blockquote">
<xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>
some assumptions;
xsl:output method could = xhtml
i matched your italic element and replaced with <i>...I used
xsl:value-of to select on the text..u may want to use xsl:copy-of to
select elements
hth, Jim Fuller
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--