[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Unable to indent text in text output -- SOLVED
Hi Matt, On Fri, Apr 1, 2011 at 08:36, Matt Dew <marcoz@osource.org> wrote: > Woohoo! I figured it out. solution below. > > <snip> >>> >>> Here’s my xsl file: >>> [snip] >> >> I don’t see any indentation here; there’s just a newline within the >> ‘xsl:text’ element. BTW, you don’t need to declare the ‘fo’ namespace >> unless you’re using it. > > Oops. Copy and paste error. Sorry about that. Thanks on the 'fo'. I've > removed it. Ah, okay. > [snip] > >> 3. CSS: set the ‘para.propagates.style’ parameter to ‘1’ so that the >> resultant HTML paragraphs have ‘box’ for their class names, then add >> whatever indentation or other styling you’d like to your CSS, such as: >> >> .box { margin-left: 0.5em; } > > For html output I do #3 already. and yes, it works quite well. :) > > Yes, the whitespace was being collapsed. <xsl:text > disable-output-escaping="yes"> was what I needed to do. > > > Here's my entire xls file: > > ------ > <?xml version='1.0' encoding="utf-8"?> > <xsl:stylesheet > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> > > <xsl:import > href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/> > > <xsl:template match="para[@role = 'box']"> > <xsl:text > disable-output-escaping="yes">     </xsl:text> > <xsl:apply-templates/> > <xsl:text disable-output-escaping="yes"><br></xsl:text> > </xsl:template> > </xsl:stylesheet> > ------ > > > I've been trying to figure that out for, well, longer than I want to admit. Happens to me practically every day. > Thank you very much!!!!!!!!! Glad I could help. :-) There’s something I don’t understand, though: you say that you already do #3 for HTML output; why not do it for XHTML as well? :-S Why do it this way? (Also, if you’re producing XHTML, you probably want to close that ‘br’.) BTW, as I said in the previous mail, you don’t need to make every space a non-breaking space (and in fact, that can have unfortunate consequences if you put too many of them on one line). Just changing every other space would do. Aankhen
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]