|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: multi-paragraph blockquotes
On May 6, 2005, at 12:09 PM, David Carlisle wrote:
So for HTML or XHTML1.x I think that using a div (which basically is p with a fixed content mode) produces semantically more meaningful html files than using p and arbitrarily splitting up a paragraph into multiple p's so that block level elements come between teh sub-paragraphs not within them. I understand your point on this David, but in my case I need to be able to match my output to the logic of input systems (in this case Word*), so I went with this solution: <xsl:template match="db:section/db:para | db:chapter/db:para | db:article/db:para"> <xsl:for-each-group select="node()" group-adjacent="self::db:orderedlist or self::db:unorderedlist or self::db:blockquote"> <xsl:choose> <xsl:when test="current-grouping-key()"> <xsl:copy-of select="current-group()"/> </xsl:when> <xsl:otherwise> <p> <xsl:copy-of select="current-group()"/> </p> </xsl:otherwise> </xsl:choose> </xsl:for-each-group> </xsl:template> I still want to figure out how to assign different class attributes depending on where the p element is ("body text" vs. "body text first indent"), but this works nicely for now. Bruce * As with a lot of publishers, mine asks for Word docs. I consider it an accomplishment that they didn't freak when I gave them xhtml!
|
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








