[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] I'm want to indent only 'section/para', not'section/para/programlisting'
On Mon, Dec 29, 2008 at 05:34:00PM +0800, Dongsheng Song wrote: > When I use custom xsl to indent 'section/para': > > <xsl:attribute-set name="standard.para.spacing" > use-attribute-sets="normal.para.spacing"> > <xsl:attribute name="text-indent">24pt</xsl:attribute> > </xsl:attribute-set> > > <xsl:template match="section/para"> > <fo:block xsl:use-attribute-sets="standard.para.spacing"> > <xsl:call-template name="anchor"/> > <xsl:apply-templates/> > </fo:block> > </xsl:template> > > But 'section/para/programlisting' indent too, how can I avoid it indent any > subelements of 'section/para'? Pretty printing is hard! I've tried a bunch of things over the years, but the if you want to do it by hand you either have to be DTD/Schema aware so that you can skip the textual content of elements who's xml:space is strictly interpreted by clients as "preserve" or else use some kind of hard-coded list. Another option is to use HTML Tidy, which also works with XML. Check out the new-pre-tags option which will do what you want: http://tidy.sourceforge.net/docs/quickref.html#new-pre-tags Hope this helps, -- Noah Slater, http://tumbolia.org/nslater
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]