Martijn Claus wrote:
> Hello,
> 
>  
> 
> I seem to encounter a bug in the renderer. The problem is that only the
> first item of a list becomes a ‘real’ list item in rtf. All others are
> hardcoded. This has consequences: When editing the rtf afterwards and
> for example adding an extra item to the list, the items behind it don’t
> automatically change.
> 
>  
> 
> It seems that there is a hack to detect if  something is a listitem if
> it starts with a 1 or an ‘a’ etc.
> 

You call it a hack. We call it a heuristic.

This heuristic is really required because XSL-FO has no concept of
``typed lists'' (e.g. an ordered list numbered using lower-alpha
characters) while the formats output by XMLmind XSL-FO Converter always
have the concept of typed lists.

Currently this heuristic is quite simple:

Take the textual contents of the first fo:list-item-label of the
fo:list-block. If it looks like "1" then generate an ordered list
numbered using Arabic numbers. If it looks like "a" then generate an
ordered list numbered using lower-alpha characters, etc. Otherwise,
generate a ``non-typed list''.

This heuristic is sufficient in most cases. In your case, your lists do
not always start with "1", "a", "A", "i", "I". Such lists should look
good when rendered by Word, but they indeed do not behave as native
lists when you edit them in the word processor.

We'll *try* to improve this heuristic in the next release of XMLmind
XSL-FO Converter and/or support a proprietary attribute (e.g.
xfc:list-type="1", "a", "A", "i", "I") specifying the type of the list.



> 
> For example in rtf:
> 
> Subheading 3_1 has been made a list item (notice the \ls1 (the reference
> to the liststyle) and the (optional) \listtext part). Subheading 3_2 has
> a hardcoded (b) in it. You can see the problem in Word as well when you
> select the listitem and click the listitemstyles button -> it will say
> None for all listitems except the first one.
> 
>  
> 
>  
> 
> …..
> 
> {\*\bkmkstart subheading3_1}
> 
> \pard\sb180\li709\fi-709\ls1\tx709
> 
> {\listtext
> 
> {\plain\f4\fs18\cf2\ulc2
> 
> (a)
> 
> }
> 
> {\plain\f4\fs18\cf2\ulc2
> 
> \tab
> 
> }
> 
> }
> 
> {\plain\f4\fs18\cf2\ulc2
> 
> The Seller holds the Shares (as defined hereafter) and the Company holds
> the Subsidiary Shares (as defined hereafter).
> 
> }
> 
> \par
> 
> {\*\bkmkend subheading3_1}
> 
> {\*\bkmkstart subheading3_2}
> 
> \pard\sb180\li709\fi-709\tx709
> 
> {\plain\f4\fs18\cf2\ulc2
> 
> (b)
> 
> }
> 
> {\plain\f4\fs18\cf2\ulc2
> 
> \tab
> 
> }
> 
> {\plain\f4\fs18\cf2\ulc2
> 
> The Buyer desires to purchase and take delivery of the Shares from the
> Seller and the Seller desires to sell and transfer the Shares to the
> Buyer, for the consideration set forth in this agreement.
> 
> }
> 
> \par
> 
> {\*\bkmkend subheading3_2}
> 
> …..
> 
>  
> 
>  
> 
> I have added 2 fo’s and the resulting rtf. In these fo’s you can see
> that the 3 is being hardcoded and the 1 isnt, no matter what order they
> are in.
> 
>  
> 
> Some extra details: Java version 1.6
> 
> Problem can be seen in word 2007 by viewing the liststyle of the
> listitem, or just in notepad like the sample I posted above.
> 
>  
> 
> Can anybody confirm that this a bug?
> 
>  
> 
> Thanks in advance,
> 
> Martijn
> 
>  
> 
>  
> 
>  
> 
> ------------------------------------------------------------------------
> Disclaimer:
> The information transmitted is intended only for use by the addressee
> and may contain confidential and/or privileged material. Any review,
> re-transmission, dissemination or other use of it, or the taking of any
> action in reliance upon this information by persons and/or entities
> other than the intended recipient is prohibited. If you received this in
> error, please inform the sender and/or addressee immediately and delete
> the material. Thank you.
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
>  
> --
> XMLmind FO Converter Support List
> [email protected]
> http://www.xmlmind.com/mailman/listinfo/xfc-support



 
--
XMLmind FO Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xfc-support

Reply via email to