tags:

views:

75

answers:

1

Hi,

I am trying to code a something quite simple which is complicated greatly by xsl-fo inline and block level elements.

Here is a sample of the XML:

<quote-block open="&quot;" close="&quot;">
   <quote-para>text...</quote-para>
   <list>
      <item>...</item>
      <item>...</item>
   </list>
   <quote-paragraph>
      <para>...</para>
      <list>
         <item>...</item>
      </list>
   </quote-paragraph>
</quote-block>

The attributes open & close are supposed to drive the opening and closing quote marks to appear around the enclosed content.

The problem I have is that because a list in fo is a block level item, I can't get the closing quote-mark to appear inline at the end of the content. It currently ends up on the start of the next line.

I can get round this by adding a load of code to each possible item to determine if its the last element in a quote and then displaying the close quote mark. But this is proving complicated to debug when it goes wrong, as the elements in the quote can be at any level and nested multiple times.

Does anyone have any ideas on how to solve this?

Thanks

A: 

How about attack this from another angle? Maybe leave out the ending quote symbol, try and stylize the opening quote (larger, coloured, etc) and/or simply colour the background/borders of the block to distinguish it as a quote - like people do on these new trendy blog thingies?

I know its not a complete solution to the issue, but while FO is IMHO an amazing tool the engine implementations and spec are still in their infancy. I've found it easier to switch route rather than attempt to "scale the wall" when it comes to issues with FO, often saving both time and sanity! ;)

digitala
Unfortunately thats not an option as I am formatting a legal publication. I have reverted to complicated xpath to work out where the quotes should go. Thanks anyway
Mike