[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: multi-paragraph blockquotes

Subject: Re: multi-paragraph blockquotes
From: Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx>
Date: 06 May 2005 17:00:30 +0100
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.