margin herit

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

margin herit

Marc-68
Hallo,
I have a problem with FOP with the FO file join below.
The problem is from the margin heritage.
The margin is inherited else if I indicate new value.
Here is the sample, I test it with XEP it's ok, but not with FOP.
Do anyone knows this problem? I don't read anything about that!

Marc
--------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <fo:layout-master-set>
        <fo:simple-page-master master-name="page" page-height="29.7cm"
page-width="21cm" margin-left="2cm">
            <fo:region-body/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="page">
        <fo:flow flow-name="xsl-region-body">
            <fo:block background-color="blue">
                <fo:block-container reference-orientation="0"
background-color="red" margin-left="1cm">
                    <fo:block background-color="yellow"
margin-left="0cm">should be ok</fo:block>
                </fo:block-container>
            </fo:block>
            <fo:block background-color="blue">
                <fo:block-container reference-orientation="0"
background-color="red" margin-left="1cm">
                    <fo:block background-color="yellow"
margin-left="-1cm">is ok with a -1cm as margin-left</fo:block>
                </fo:block-container>
            </fo:block>
            <fo:block background-color="blue">
                <fo:block background-color="yellow" margin-left="1cm">
                    <fo:table>
                        <fo:table-body>
                            <fo:table-row>
                                <fo:table-cell background-color="green">
                                    <fo:block background-color="red"
margin-left="0cm">should be ok</fo:block>
                                </fo:table-cell>
                            </fo:table-row>
                        </fo:table-body>
                    </fo:table>
                </fo:block>
            </fo:block>
            <fo:block background-color="blue">
                <fo:block background-color="yellow" margin-left="1cm">
                    <fo:table>
                        <fo:table-body>
                            <fo:table-row>
                                <fo:table-cell background-color="green"
margin-left="0cm">
                                    <fo:block background-color="red">is
ok with a margin-left at 0cm on the table-cell</fo:block>
                                </fo:table-cell>
                            </fo:table-row>
                        </fo:table-body>
                    </fo:table>
                </fo:block>
            </fo:block>
        </fo:flow>
    </fo:page-sequence>
</fo:root>

Reply | Threaded
Open this post in threaded view
|

Re: margin herit

Jeremias Maerki-2
Hi Marc

Yes, it's a well-known topic. Strictly speaking, FOP behaves according
to the spec and XEP does not. That has been verified with the XSL
working group. The problem is that the effects may not match user
expectations which is why many FO implementations have chosen to reset
indents over the so-called reference area boundary rather than to adhere
to the specification.

If you want to learn about the details, I wrote a report on the topic
here: http://wiki.apache.org/xmlgraphics-fop/IndentInheritance

Long story short: you can tell FOP to "misbehave" and also reset the
indents. Check out [1] and look for "break-indent-inheritance". Or if
you configure FOP from Java code, look at [2] and look for
"setBreakIndentInheritanceOnReferenceAreaBoundary".

[1] http://xmlgraphics.apache.org/fop/1.0/configuration.html
[2] http://xmlgraphics.apache.org/fop/1.0/embedding.html#fop-factory

HTH
Jeremias Maerki


On 08.06.2012 13:51:42 Marc wrote:

> Hallo,
> I have a problem with FOP with the FO file join below.
> The problem is from the margin heritage.
> The margin is inherited else if I indicate new value.
> Here is the sample, I test it with XEP it's ok, but not with FOP.
> Do anyone knows this problem? I don't read anything about that!
>
> Marc
> --------------------------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>     <fo:layout-master-set>
>         <fo:simple-page-master master-name="page" page-height="29.7cm"
> page-width="21cm" margin-left="2cm">
>             <fo:region-body/>
>         </fo:simple-page-master>
>     </fo:layout-master-set>
>     <fo:page-sequence master-reference="page">
>         <fo:flow flow-name="xsl-region-body">
>             <fo:block background-color="blue">
>                 <fo:block-container reference-orientation="0"
> background-color="red" margin-left="1cm">
>                     <fo:block background-color="yellow"
> margin-left="0cm">should be ok</fo:block>
>                 </fo:block-container>
>             </fo:block>
>             <fo:block background-color="blue">
>                 <fo:block-container reference-orientation="0"
> background-color="red" margin-left="1cm">
>                     <fo:block background-color="yellow"
> margin-left="-1cm">is ok with a -1cm as margin-left</fo:block>
>                 </fo:block-container>
>             </fo:block>
>             <fo:block background-color="blue">
>                 <fo:block background-color="yellow" margin-left="1cm">
>                     <fo:table>
>                         <fo:table-body>
>                             <fo:table-row>
>                                 <fo:table-cell background-color="green">
>                                     <fo:block background-color="red"
> margin-left="0cm">should be ok</fo:block>
>                                 </fo:table-cell>
>                             </fo:table-row>
>                         </fo:table-body>
>                     </fo:table>
>                 </fo:block>
>             </fo:block>
>             <fo:block background-color="blue">
>                 <fo:block background-color="yellow" margin-left="1cm">
>                     <fo:table>
>                         <fo:table-body>
>                             <fo:table-row>
>                                 <fo:table-cell background-color="green"
> margin-left="0cm">
>                                     <fo:block background-color="red">is
> ok with a margin-left at 0cm on the table-cell</fo:block>
>                                 </fo:table-cell>
>                             </fo:table-row>
>                         </fo:table-body>
>                     </fo:table>
>                 </fo:block>
>             </fo:block>
>         </fo:flow>
>     </fo:page-sequence>
> </fo:root>


Reply | Threaded
Open this post in threaded view
|

Re: margin herit

Glenn Adams-2
In reply to this post by Marc-68
For future reference, this mail list is for discussing the XSL-FO specification, not for discussing specific implementation behavior. Please continue your email thread on [hidden email] if necessary, but make sure you read and understand [1] and [2] first:


Regards,
Glenn

On Fri, Jun 8, 2012 at 5:51 AM, Marc <[hidden email]> wrote:
Hallo,
I have a problem with FOP with the FO file join below.
The problem is from the margin heritage.
The margin is inherited else if I indicate new value.
Here is the sample, I test it with XEP it's ok, but not with FOP.
Do anyone knows this problem? I don't read anything about that!

Marc
--------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
      <fo:simple-page-master master-name="page" page-height="29.7cm" page-width="21cm" margin-left="2cm">
          <fo:region-body/>
      </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="page">
      <fo:flow flow-name="xsl-region-body">
          <fo:block background-color="blue">
              <fo:block-container reference-orientation="0" background-color="red" margin-left="1cm">
                  <fo:block background-color="yellow" margin-left="0cm">should be ok</fo:block>
              </fo:block-container>
          </fo:block>
          <fo:block background-color="blue">
              <fo:block-container reference-orientation="0" background-color="red" margin-left="1cm">
                  <fo:block background-color="yellow" margin-left="-1cm">is ok with a -1cm as margin-left</fo:block>
              </fo:block-container>
          </fo:block>
          <fo:block background-color="blue">
              <fo:block background-color="yellow" margin-left="1cm">
                  <fo:table>
                      <fo:table-body>
                          <fo:table-row>
                              <fo:table-cell background-color="green">
                                  <fo:block background-color="red" margin-left="0cm">should be ok</fo:block>
                              </fo:table-cell>
                          </fo:table-row>
                      </fo:table-body>
                  </fo:table>
              </fo:block>
          </fo:block>
          <fo:block background-color="blue">
              <fo:block background-color="yellow" margin-left="1cm">
                  <fo:table>
                      <fo:table-body>
                          <fo:table-row>
                              <fo:table-cell background-color="green" margin-left="0cm">
                                  <fo:block background-color="red">is ok with a margin-left at 0cm on the table-cell</fo:block>
                              </fo:table-cell>
                          </fo:table-row>
                      </fo:table-body>
                  </fo:table>
              </fo:block>
          </fo:block>
      </fo:flow>
  </fo:page-sequence>
</fo:root>


Reply | Threaded
Open this post in threaded view
|

Re: margin herit

Jeremias Maerki-2
Glenn,
discussing differences between implementations (i.e. the interpretation
of the spec) is perfectly within scope of this mailing list, if you ask
me.


Jeremias Maerki


On 08.06.2012 15:16:43 Glenn Adams wrote:

> For future reference, this mail list is for discussing the XSL-FO
> specification, not for discussing specific implementation behavior. Please
> continue your email thread on [hidden email] if
> necessary, but make sure you read and understand [1] and [2] first:
>
> [1] http://xmlgraphics.apache.org/fop/faq.html#indent-inheritance
> [2] http://wiki.apache.org/xmlgraphics-fop/IndentInheritance
>
> Regards,
> Glenn
>
> On Fri, Jun 8, 2012 at 5:51 AM, Marc <[hidden email]> wrote:
>
> > Hallo,
> > I have a problem with FOP with the FO file join below.
> > The problem is from the margin heritage.
> > The margin is inherited else if I indicate new value.
> > Here is the sample, I test it with XEP it's ok, but not with FOP.
> > Do anyone knows this problem? I don't read anything about that!
> >
> > Marc
> > ------------------------------**------------------------------**--------
> > <?xml version="1.0" encoding="UTF-8"?>
> > <fo:root xmlns:fo="http://www.w3.org/**1999/XSL/Format<http://www.w3.org/1999/XSL/Format>
> > ">
> >   <fo:layout-master-set>
> >       <fo:simple-page-master master-name="page" page-height="29.7cm"
> > page-width="21cm" margin-left="2cm">
> >           <fo:region-body/>
> >       </fo:simple-page-master>
> >   </fo:layout-master-set>
> >   <fo:page-sequence master-reference="page">
> >       <fo:flow flow-name="xsl-region-body">
> >           <fo:block background-color="blue">
> >               <fo:block-container reference-orientation="0"
> > background-color="red" margin-left="1cm">
> >                   <fo:block background-color="yellow"
> > margin-left="0cm">should be ok</fo:block>
> >               </fo:block-container>
> >           </fo:block>
> >           <fo:block background-color="blue">
> >               <fo:block-container reference-orientation="0"
> > background-color="red" margin-left="1cm">
> >                   <fo:block background-color="yellow"
> > margin-left="-1cm">is ok with a -1cm as margin-left</fo:block>
> >               </fo:block-container>
> >           </fo:block>
> >           <fo:block background-color="blue">
> >               <fo:block background-color="yellow" margin-left="1cm">
> >                   <fo:table>
> >                       <fo:table-body>
> >                           <fo:table-row>
> >                               <fo:table-cell background-color="green">
> >                                   <fo:block background-color="red"
> > margin-left="0cm">should be ok</fo:block>
> >                               </fo:table-cell>
> >                           </fo:table-row>
> >                       </fo:table-body>
> >                   </fo:table>
> >               </fo:block>
> >           </fo:block>
> >           <fo:block background-color="blue">
> >               <fo:block background-color="yellow" margin-left="1cm">
> >                   <fo:table>
> >                       <fo:table-body>
> >                           <fo:table-row>
> >                               <fo:table-cell background-color="green"
> > margin-left="0cm">
> >                                   <fo:block background-color="red">is ok
> > with a margin-left at 0cm on the table-cell</fo:block>
> >                               </fo:table-cell>
> >                           </fo:table-row>
> >                       </fo:table-body>
> >                   </fo:table>
> >               </fo:block>
> >           </fo:block>
> >       </fo:flow>
> >   </fo:page-sequence>
> > </fo:root>
> >
> >


Reply | Threaded
Open this post in threaded view
|

Re: margin herit

Glenn Adams-2
I agree, if that is what this writer was discussing. The mail started with "I have a problem with FOP..."

On Fri, Jun 8, 2012 at 7:34 AM, Jeremias Maerki <[hidden email]> wrote:
Glenn,
discussing differences between implementations (i.e. the interpretation
of the spec) is perfectly within scope of this mailing list, if you ask
me.


Jeremias Maerki


On 08.06.2012 15:16:43 Glenn Adams wrote:
> For future reference, this mail list is for discussing the XSL-FO
> specification, not for discussing specific implementation behavior. Please
> continue your email thread on [hidden email] if
> necessary, but make sure you read and understand [1] and [2] first:
>
> [1] http://xmlgraphics.apache.org/fop/faq.html#indent-inheritance
> [2] http://wiki.apache.org/xmlgraphics-fop/IndentInheritance
>
> Regards,
> Glenn
>
> On Fri, Jun 8, 2012 at 5:51 AM, Marc <[hidden email]> wrote:
>
> > Hallo,
> > I have a problem with FOP with the FO file join below.
> > The problem is from the margin heritage.
> > The margin is inherited else if I indicate new value.
> > Here is the sample, I test it with XEP it's ok, but not with FOP.
> > Do anyone knows this problem? I don't read anything about that!
> >
> > Marc
> > ------------------------------**------------------------------**--------
> > <?xml version="1.0" encoding="UTF-8"?>
> > <fo:root xmlns:fo="http://www.w3.org/**1999/XSL/Format<http://www.w3.org/1999/XSL/Format>
> > ">
> >   <fo:layout-master-set>
> >       <fo:simple-page-master master-name="page" page-height="29.7cm"
> > page-width="21cm" margin-left="2cm">
> >           <fo:region-body/>
> >       </fo:simple-page-master>
> >   </fo:layout-master-set>
> >   <fo:page-sequence master-reference="page">
> >       <fo:flow flow-name="xsl-region-body">
> >           <fo:block background-color="blue">
> >               <fo:block-container reference-orientation="0"
> > background-color="red" margin-left="1cm">
> >                   <fo:block background-color="yellow"
> > margin-left="0cm">should be ok</fo:block>
> >               </fo:block-container>
> >           </fo:block>
> >           <fo:block background-color="blue">
> >               <fo:block-container reference-orientation="0"
> > background-color="red" margin-left="1cm">
> >                   <fo:block background-color="yellow"
> > margin-left="-1cm">is ok with a -1cm as margin-left</fo:block>
> >               </fo:block-container>
> >           </fo:block>
> >           <fo:block background-color="blue">
> >               <fo:block background-color="yellow" margin-left="1cm">
> >                   <fo:table>
> >                       <fo:table-body>
> >                           <fo:table-row>
> >                               <fo:table-cell background-color="green">
> >                                   <fo:block background-color="red"
> > margin-left="0cm">should be ok</fo:block>
> >                               </fo:table-cell>
> >                           </fo:table-row>
> >                       </fo:table-body>
> >                   </fo:table>
> >               </fo:block>
> >           </fo:block>
> >           <fo:block background-color="blue">
> >               <fo:block background-color="yellow" margin-left="1cm">
> >                   <fo:table>
> >                       <fo:table-body>
> >                           <fo:table-row>
> >                               <fo:table-cell background-color="green"
> > margin-left="0cm">
> >                                   <fo:block background-color="red">is ok
> > with a margin-left at 0cm on the table-cell</fo:block>
> >                               </fo:table-cell>
> >                           </fo:table-row>
> >                       </fo:table-body>
> >                   </fo:table>
> >               </fo:block>
> >           </fo:block>
> >       </fo:flow>
> >   </fo:page-sequence>
> > </fo:root>
> >
> >



Reply | Threaded
Open this post in threaded view
|

Re: margin herit

Marc-68
Thank you very much for answers.
I was looking for this problem in the lists but perhaps not with the
good keywords.
I will read the wiki.
Sorry to start the message with not a good sentence for the list, I
thank that this list was the good one and had an hesitation with the FOP
list.
Marc

Le 08/06/2012 16:15, Glenn Adams a écrit :

> I agree, if that is what this writer was discussing. The mail started
> with "I have a problem with FOP..."
>
> On Fri, Jun 8, 2012 at 7:34 AM, Jeremias Maerki <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Glenn,
>     discussing differences between implementations (i.e. the interpretation
>     of the spec) is perfectly within scope of this mailing list, if you ask
>     me.
>
>
>     Jeremias Maerki
>
>
>     On 08.06.2012 15:16:43 Glenn Adams wrote:
>      > For future reference, this mail list is for discussing the XSL-FO
>      > specification, not for discussing specific implementation
>     behavior. Please
>      > continue your email thread on [hidden email]
>     <mailto:[hidden email]> if
>      > necessary, but make sure you read and understand [1] and [2] first:
>      >
>      > [1] http://xmlgraphics.apache.org/fop/faq.html#indent-inheritance
>      > [2] http://wiki.apache.org/xmlgraphics-fop/IndentInheritance
>      >
>      > Regards,
>      > Glenn
>      >
>      > On Fri, Jun 8, 2012 at 5:51 AM, Marc <[hidden email]
>     <mailto:[hidden email]>> wrote:
>      >
>      > > Hallo,
>      > > I have a problem with FOP with the FO file join below.
>      > > The problem is from the margin heritage.
>      > > The margin is inherited else if I indicate new value.
>      > > Here is the sample, I test it with XEP it's ok, but not with FOP.
>      > > Do anyone knows this problem? I don't read anything about that!
>      > >
>      > > Marc
>      > >
>     ------------------------------**------------------------------**--------
>      > > <?xml version="1.0" encoding="UTF-8"?>
>      > > <fo:root
>     xmlns:fo="http://www.w3.org/**1999/XSL/Format<http://www.w3.org/1999/XSL/Format>
>      > > ">
>      > > <fo:layout-master-set>
>      > > <fo:simple-page-master master-name="page" page-height="29.7cm"
>      > > page-width="21cm" margin-left="2cm">
>      > > <fo:region-body/>
>      > > </fo:simple-page-master>
>      > > </fo:layout-master-set>
>      > > <fo:page-sequence master-reference="page">
>      > > <fo:flow flow-name="xsl-region-body">
>      > > <fo:block background-color="blue">
>      > > <fo:block-container reference-orientation="0"
>      > > background-color="red" margin-left="1cm">
>      > > <fo:block background-color="yellow"
>      > > margin-left="0cm">should be ok</fo:block>
>      > > </fo:block-container>
>      > > </fo:block>
>      > > <fo:block background-color="blue">
>      > > <fo:block-container reference-orientation="0"
>      > > background-color="red" margin-left="1cm">
>      > > <fo:block background-color="yellow"
>      > > margin-left="-1cm">is ok with a -1cm as margin-left</fo:block>
>      > > </fo:block-container>
>      > > </fo:block>
>      > > <fo:block background-color="blue">
>      > > <fo:block background-color="yellow" margin-left="1cm">
>      > > <fo:table>
>      > > <fo:table-body>
>      > > <fo:table-row>
>      > > <fo:table-cell background-color="green">
>      > > <fo:block background-color="red"
>      > > margin-left="0cm">should be ok</fo:block>
>      > > </fo:table-cell>
>      > > </fo:table-row>
>      > > </fo:table-body>
>      > > </fo:table>
>      > > </fo:block>
>      > > </fo:block>
>      > > <fo:block background-color="blue">
>      > > <fo:block background-color="yellow" margin-left="1cm">
>      > > <fo:table>
>      > > <fo:table-body>
>      > > <fo:table-row>
>      > > <fo:table-cell background-color="green"
>      > > margin-left="0cm">
>      > > <fo:block background-color="red">is ok
>      > > with a margin-left at 0cm on the table-cell</fo:block>
>      > > </fo:table-cell>
>      > > </fo:table-row>
>      > > </fo:table-body>
>      > > </fo:table>
>      > > </fo:block>
>      > > </fo:block>
>      > > </fo:flow>
>      > > </fo:page-sequence>
>      > > </fo:root>
>      > >
>      > >
>
>
>