[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: line break
Inserting <br> in DocBook always needs some way round. You can slightly modify XSL stylesheet, "inline.xsl" like: <!-- code starts here --> <xsl:template match="quote"> <xsl:variable name="depth"> <xsl:call-template name="dot.count"> <xsl:with-param name="string"><xsl:number level="multiple"/></xsl:with-param> </xsl:call-template> </xsl:variable> <xsl:choose> <xsl:when test="$depth mod 2 = 0"> <xsl:if test="@role='dialog'"><br/></xsl:if> <xsl:call-template name="gentext.startquote"/> <xsl:call-template name="inline.charseq"/> <xsl:call-template name="gentext.endquote"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="gentext.nestedstartquote"/> <xsl:call-template name="inline.charseq"/> <xsl:call-template name="gentext.nestedendquote"/> </xsl:otherwise> </xsl:choose> </xsl:template> <!--code ends--> I just added "<xsl:if test="@role='dialog'"><br/></xsl:if>". You can insert this simply in your XSL customisation layer. Now if you markup a dialog like "...he said <quote role="dialog">...</quote>", then <br> (converted from <br/>) is put before the quote. The part "<xsl:otherwise..." is a "quote in a quote", so you won't want to add newline (or you may want; just add the same "<xsl:if..." to the "otherwise" part). -- Yoshihiro Toda <mailto:ystoda@yahoo.co.jp> __________________________________________________ Do You Yahoo!? http://bb.yahoo.co.jp/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]