Hi Jean-François,

Jean-François El Fouly wrote:
> I take as reference: http://www.w3.org/TR/xsl/

<snip/>

> *GRAVE: Exception
> javax.xml.transform.TransformerException:
> org.apache.fop.fo.ValidationException:
> file:/D:/Java/fop-0.95beta/test-rtm.fo:533:112: Error(533/112):
> fo:retrieve-tab
> le-marker is not a valid child element of fo:table-header.
> *
> For the sake of clarity only let's call this a "bug" since
> *fo-retrieve-table-marker* /is/ a valid child element of
> *fo:table-header:* http://www.w3.org/TR/xsl/#fo_retrieve-table-marker

That’s right.

> So let's read the full stack trace and "fix" this by adding one more
> condition in *org.apache.fop.fo.flow.table.TablePart.validateChildNode()*.
> The next step is where I'm puzzled and don't know how to proceed since
> the W3C recommendation and the example they give seem inconsistent with
> each other, while the error message FOP returns seems consistent with
> the recommendation:
> 
> *GRAVE: Exception
> javax.xml.transform.TransformerException:
> org.apache.fop.fo.ValidationException:
> "{http://www.w3.org/1999/XSL/Format}table-row"; is not a valid child of
> "fo:mark
> er"! (See position 557:21)
> *
> This error is consistent with the W3C TR:
> http://www.w3.org/TR/xsl/#fo_marker
> that says that the fo:marker contents is:
> 
> (#PCDATA|%inline; <http://www.w3.org/TR/xsl/#inline.fo.list>|%block;
> <http://www.w3.org/TR/xsl/#block.fo.list>)*

Actually, just below the content model you have the following sentence:
“An fo:marker may contain any formatting objects that are permitted as
a replacement of any fo:retrieve-marker or fo:retrieve-table-marker that
retrieves the fo:marker’s children.”

Which actually is a bit inconsistent with the content model just above.
If you ever feel like mentioning this inconsistency to [EMAIL PROTECTED]
I think the behaviour you get by following that sentence is sensible, so
go for it.


> but it makes the example they give useless (indeed, neither inline nor
> block allow directly or indirectly table-row).
> And so I don't quite know where I'm allowed to go from here. (If I
> change a behaviour in
> *org.apache.fop.fo.flow.Marker.validateChildNode()* I may end up with
> something that works and fits the bill but is inconsistent with the TR).

Unless I’m missing something, Marker.validateChildNode should do nothing
else than passing the call to its parent element.

HTH,
Vincetn

Reply via email to