|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: multi-paragraph blockquotes
>>>>> "Bruce" == Bruce D'Arcus <bdarcus@xxxxxxxxx> writes:
Bruce> On May 6, 2005, at 11:45 AM, Colin Paul Adams wrote:
>> <div> <p>Some text:</p> <blockquote> <p>One paragraph.</p>
>>
>> etc. and adjust the templates accordingly.
Bruce> Yes, that was what I was just about to say in reply to Jay.
Bruce> But how do you do this in XSLT (2.0)?
Just take Jay's templates:
<xsl:template match="para">
<p><xsl:apply-templates/></p>
</xsl:template>
<xsl:template match="blockquote">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="blockquote/para">
<p style="text-indent:.25in"><xsl:apply-templates/></p>
</xsl:template>
and change them to:
<xsl:template match="para">
<div><xsl:apply-templates/></div>
</xsl:template>
<xsl:template match="blockquote">
<blockquote><xsl:apply-templates/></blockquote>
</xsl:template>
<xsl:template match="blockquote/para">
<p><xsl:apply-templates/></p>
</xsl:template>
should do the trick, I think (untested)
--
Colin Paul Adams
Preston Lancashire
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








