xsl-list
[Top] [All Lists]

[xsl] text indent problem

2007-01-08 16:10:19
Hello everybody,

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

I´m 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!), I´m 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 don´t 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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>