[xsl] text indent problem

Subject: [xsl] text indent problem
From: "Barbara Lackenbauer" <Ronwen@xxxxxx>
Date: Tue, 09 Jan 2007 00:09:52 +0100
Hello everybody,

I4m new to this list, and maybe someone can help me with my xsl problem, what would be just great.

I4m creating a xsl-stylesheet (version 1.0) for novels. I want to add an indent at the beginning of each new paragraph (except the one following to the headline). With the help of Abel (thank you!), I4m at this point now:

xsl:

  <xsl:template match="text()[preceding-sibling::*[1][self::absatz]]">
      <fo:block text-indent="10pt">
          <xsl:value-of select="."/>
      </fo:block>
  </xsl:template> 

xml:

First paragraph without indent.
<absatz />
Next paragraph with indent.
<absatz />
And so on.

So far, this is working just fine. My problem is now, that paragraphs can also start like this:

xml:

First paragraph without indent.
<absatz />
<b>Next paragraph</b> with indent.
<absatz />
<i>Next</i> paragraph that is supposed to start with an indent as well.

So, next to starting by text, the paragraphs can also start with a b or i node. And at the moment, I don4t see a possibility how to create the indent for these additional cases without creating a new block element. It would be great if someone could give me a hint.

Thanks in advance,
greetings,
Barbara

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal f|r Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

Current Thread