xsl-list
[Top] [All Lists]

Re: multi-paragraph blockquotes

2005-05-06 09:00:30
"Bruce" == Bruce D'Arcus <bdarcus(_at_)gmail(_dot_)com> 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

--~------------------------------------------------------------------
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>
--~--



<Prev in Thread] Current Thread [Next in Thread>