I am using FOP 1.1 and I am trying to make use of fo:change-bar-begin, but I am getting the following error:
org.apache.fop.fo.ValidationException: "fo:change-bar-begin" is not a valid child of "fo:inline"!
According to W3C Recommandation, change-bar-begin and change-bar-end define "points" and may be used anywhere as a descendant of fo:flow or fo:static-content, basically in any fo:block or fo:inline.
Sample code:
<fo:block background-color="Tomato" text-indent="-57.5pt" start-indent="57.5pt">
<fo:inline background-color="aquamarine" font-size="10" font-family="Arial, sans-serif">1.</fo:inline>
<fo:change-bar-begin change-bar-offset="2mm" change-bar-color="red" change-bar-style="solid" change-bar-class="cc01"/>
<fo:inline background-color="LightSteelBlue" keep-with-previous="always" font-size="10" font-family="Arial, sans-serif" padding-left="48.39pt">Remove panel.</fo:inline>
<fo:change-bar-end change-bar-class="cc01"/>
</fo:block>
What do I do wrong?
Thank you!
Florin
It looks okay to me, and you are correct about fo:change-bar-begin
being allowed anywhere as a descendant of fo:flow
or fo:static-content
. So this looks like it is a FOP bug.
In your example, fo:change-bar-begin
is not actually a child of fo:inline
. Did you try putting the change bar FOs inside the fo:inline
?
FWIW, there is a formatted change bar example in the "Comprehensive XSL-FO Tutorials and Samples Collection" at https://www.antennahouse.com/antenna1/comprehensive-xsl-fo-tutorials-and-samples-collection/.