Loading ...
Sorry, an error occurred while loading the content.
 

Re: [XSL-FO] absolute-position="absolute"

Expand Messages
  • Klaas_Bals@inventivedesigners.com
    ... area, ... how ... not ... That is indeed what the spec says, but... That is in a part that was copied in from CSS. There are some modifications that the
    Message 1 of 3 , Oct 24, 2004
      > The output from Ibex XSL-FO Formatter is here:
      > http://www.xmlpdf.com/decorate-using-block-container.ibex.pdf
      >
      > Ibex treats the absolute position as being relative to the containing
      area,
      > not the containing reference area.
      >
      > Specifically the property "top" is specified as "This property specifies
      how
      > far a box's top margin edge is offset below the top edge of the box's
      > containing block.", so again the spec. refers to the containing block,
      not
      > the containing reference area.

      That is indeed what the spec says, but... That is in a part that was
      copied in from CSS. There are some modifications that the XSL spec does in
      that respect.

      Let me explain why I read that it should be relative to the containing
      reference-area (whether or not that is positioned absolutely). Note that a
      containing reference area is not the same as a containing block, because a
      block doesn't establish a reference area, only a block-container and some
      other formatting objects do.

      ----- Quotes from the XSL 1.0 spec --------
      Section 4.2.2 Common traits
      Each area has the traits top-position, bottom-position, left-position, and
      right-position which represent the distance from the edges of its
      content-rectangle to the like-named edges of the nearest ancestor
      reference-area (or the page-viewport-area in the case of areas generated
      by descendants of formatting objects whose absolute-position is fixed);
      the left-offset and top-offset determine the amount by which a
      relatively-positioned area is shifted for rendering. These traits receive
      their values during the formatting process, or in the case of absolutely
      positioned areas, during refinement.

      Section 5.5 Complex Property to Trait Mapping
      Subsection 5.5.4 Absolute-position Property
      If absolute-position = "absolute" or "fixed", the values of the
      left-position, top-position, etc. traits are copied directly from the
      values of the "left", "top", etc. properties. Otherwise these traits'
      values are left undefined during refinement and determined during
      composition.

      Section 5.6 Non-property Based Trait Generation
      The is-reference-area trait is set to "true" for the following formatting
      objects: "simple-page-master", "title", "region-body",
      "region-before","region-after", "region-start", "region-end",
      "block-container", "inline-container", "table", "table-caption", and
      "table-cell". For all other formatting objects it is set to "false".
      ------------

      If you want to position an object absolute relative to a parent that is
      not absolute, create a reference-area (the parent - that is implicitly as
      part of the flow positioned relative), and create a block container as a
      child that has absolute-position="absolute".
      If you want to position an object absolute relative to the page, create a
      block-container with absolute-position="fixed".
      Regarding which rectangle we position to, the left, right, top and bottom
      properties are the distances from the content rectangle of the parent
      reference-area to the content rectange of the absolutely positioned child
      object (as explained in section 4.2.2 quoted above).


      This is the way that Scriptura XBOS implements the properties.


      Disclaimer: Although I am a member of the XSL Working Group, I don't
      represent the meaning of the entire working group. I do personally believe
      that this is the working groups opinion though.

      Best regards,
      -----
      Klaas Bals - CTO
      Inventive Designers
      Direct Phone: +32 - 3 - 8210183
      Office Phone: +32 - 3 - 8210170
      Office Fax: +32 - 3 - 8210171
      Email: Klaas_Bals at inventivedesigners dot com

      Inventive Designers - Keep your options open...




      "Jensen" <yahoo@...> wrote on 21/10/2004 06:03:13:

      > Hi
      >
      >
      > Regards
      >
      > John Farrow
      >
      > Visual Programming Ltd mail PO Box 22-222, Khandallah, Wellington, New
      > Zealand site Level 2, 2 Ganges Road, Khandallah, Wellington, New Zealand

      > phone +64 4 479 1738 fax +64 4 479 1294 web http://www.xmlpdf.com
      > ----- Original Message -----
      > From: "Victor Vishnyakov" <tch_@...>
      > To: <XSL-FO@yahoogroups.com>
      > Sent: Thursday, October 21, 2004 3:59 AM
      > Subject: [XSL-FO] absolute-position="absolute"
      >
      >
      > >
      > > Spec. says: absolute-position="absolute"
      > > The area's position (and possibly size) is specified with the "left",
      > > "right", "top", and "bottom"properties. These properties specify
      offsets
      > > with respect to the area's containing area. Absolutely positioned
      areas
      > > are
      > > taken out of the normal flow. This means they have no impact on the
      layout
      > > of later siblings. Also, though absolutely positioned areas have
      margins,
      > > they do not collapsewith any other margins.
      > >
      > >
      > > "These properties specify offsets with respect to the area's
      containing
      > > area." Which area mentioned here reference-area or parent fo object
      area?
      > >
      > >
      > > I've tried to resolve this question empirically and create XSL-FO
      sample:
      > > http://xslfo-zone.com/xsl-fo/decorate-using-block-container.fo
      > > Then I ran three my favourite formatters (XSL Formatter, XEP, Xml2PDF)
      > > planning to obtain the similar results. But with score 2:1
      reference-area
      > > won (I'm a bit surprised).
      > >
      > > The results are here:
      > > http://xslfo-zone.com/pdf/decorate-using-block-container.fo.xep.pdf
      > >
      http://xslfo-zone.com/pdf/decorate-using-block-container.fo.xml2pdf.pdf
      > >
      http://xslfo-zone.com/pdf/decorate-using-block-container.fo.xslf.v3.pdf
      > >
      > >
      > > Can someone clarify?
      > >
      > >
      > > Regrads,
      > > Victor Vishnyakov
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      > > Yahoo! Groups Links
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      >
      >

      >
      > Yahoo! Groups Sponsor
      >
      > ADVERTISEMENT
      > [image removed]
      >
      > [image removed]
      >
      >
      > Yahoo! Groups Links
      > To visit your group on the web, go to:
      > http://groups.yahoo.com/group/XSL-FO/
      >
      > To unsubscribe from this group, send an email to:
      > XSL-FO-unsubscribe@yahoogroups.com
      >
      > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
      --------------------------------------------------
      Inventive Designers' Email Disclaimer:
      http://www.inventivedesigners.com/email-disclaimer
    Your message has been successfully submitted and would be delivered to recipients shortly.