[xep-support] Superscripts cause list item label to be raised above list item body baseline

Jim Melton jim.melton at acm.org
Fri Mar 14 15:00:01 PST 2003


I have encountered a very strange problem when rendering XSL FO to PDF 
using RenderX XEP 3.2.2 (and some earlier versions, as well).  The 
situation is easy enough to describe:

I am writing a large standards document using XML.  In that document, I 
have a rule (a list element) whose text contains a superscript.  Here's an 
abstract of that XML:
<item>If <emph>MAX</emph> is equal to 2<super>63</super>-1 
(9,223,372,036,854,775,807) and <emph>MIN</emph> is equal to 
-2<super>63</super> (-9,223,372,036,854,775,808), then <emph>REST</emph> is:

When that XML is transformed by my XSLT stylesheet into XSL FO, it looks 
like this:
<fo:list-block provisional-label-separation="3pt" 
space-before.optimum="6pt" provisional-distance-between-starts="18pt">

<fo:list-item id="'generate_id()'" space-before.optimum="8pt" 
hyphenate="true">
<fo:list-item-label end-indent="label-end()">
<fo:block text-align="start">1)</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>If <fo:inline font-style="italic">MAX</fo:inline> is equal to 
2<fo:inline baseline-shift="super" font-size="smaller">63</fo:inline>-1
(9,223,372,036,854,775,807) and <fo:inline 
font-style="italic">MIN</fo:inline> is equal to
-2<fo:inline baseline-shift="super" font-size="smaller">63</fo:inline> 
(-9,223,372,036,854,775,808), then <fo:inline 
font-style="italic">REST</fo:inline>
is:

I have attached a larger abstract from the XSL FO to this message, although 
I doubt that additional value will be gained from examining that larger 
abstract.

The result of rendering the XSL FO into PDF is a list element in which the 
list item label (in this case, "1)") to be raised above the baseline of the 
list item body's baseline...in fact, it is raised to the baseline of the 
superscripts on the first line of the list item body!

This is demonstrated in the 1-page PDF file that I attached to this message.

Is there something wrong with my XSL FO, or is this a bug (possibly already 
reported?) in XEP?

Thanks,
    Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20030314/742a7a0d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Pages from 5wd-14-XML-2002-12-24.pdf
Type: application/pdf
Size: 4542 bytes
Desc: not available
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20030314/742a7a0d/attachment.pdf>
-------------- next part --------------
<fo:block space-before.optimum="8pt" space-before.minimum="8pt" space-before.maximum="28pt" hyphenate="true">

Case:

</fo:block>

<fo:list-block provisional-label-separation="3pt" space-before.optimum="6pt" provisional-distance-between-starts="18pt">


<fo:list-item id="'generate_id()'" space-before.optimum="8pt" hyphenate="true">
<fo:list-item-label end-indent="label-end()">
<fo:block text-align="start">1)</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>If <fo:inline font-style="italic">MAX</fo:inline> is equal to 2<fo:inline baseline-shift="super" font-size="smaller">63</fo:inline>-1
(9,223,372,036,854,775,807) and <fo:inline font-style="italic">MIN</fo:inline> is equal to
-2<fo:inline baseline-shift="super" font-size="smaller">63</fo:inline> (-9,223,372,036,854,775,808), then <fo:inline font-style="italic">REST</fo:inline>
is:


<fo:block space-before="-3pt" space-after="-3pt" font="9pt Courier" white-space-treatment="preserve" linefeed-treatment="preserve" white-space-collapse="false">
&lt;xsd:restriction base="xsd:long"/&gt;
</fo:block>



</fo:block>
</fo:list-item-body>
</fo:list-item>


<fo:list-item id="'generate_id()'" space-before.optimum="8pt" hyphenate="true">
<fo:list-item-label end-indent="label-end()">
<fo:block text-align="start">2)</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>If <fo:inline font-style="italic">MAX</fo:inline> is less than 2<fo:inline baseline-shift="super" font-size="smaller">63</fo:inline>-1
(9,223,372,036,854,775,807) and <fo:inline font-style="italic">MIN</fo:inline> is equal to
-2<fo:inline baseline-shift="super" font-size="smaller">63</fo:inline> (-9,223,372,036,854,775,808), then <fo:inline font-style="italic">REST</fo:inline>
is:


<fo:block space-before="-3pt" space-after="-3pt" font="9pt Courier" white-space-treatment="preserve" linefeed-treatment="preserve" white-space-collapse="false">
&lt;xsd:restriction base="xsd:long"&gt;
  <fo:inline font-style="italic">FACETMAX</fo:inline>
&lt;/xsd:restriction&gt;
</fo:block>



</fo:block>
</fo:list-item-body>
</fo:list-item>


<fo:list-item id="'generate_id()'" space-before.optimum="8pt" hyphenate="true">
<fo:list-item-label end-indent="label-end()">
<fo:block text-align="start">3)</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>If <fo:inline font-style="italic">MAX</fo:inline> is equal to 2<fo:inline baseline-shift="super" font-size="smaller">63</fo:inline>-1
(9,223,372,036,854,775,807) and <fo:inline font-style="italic">MIN</fo:inline> is greater than
-2<fo:inline baseline-shift="super" font-size="smaller">63</fo:inline> (-9,223,372,036,854,775,808) but not equal to 0
(zero), then <fo:inline font-style="italic">REST</fo:inline> is:


<fo:block space-before="-3pt" space-after="-3pt" font="9pt Courier" white-space-treatment="preserve" linefeed-treatment="preserve" white-space-collapse="false">
&lt;xsd:restriction base="xsd:long"&gt;
  <fo:inline font-style="italic">FACETMIN</fo:inline>
&lt;/xsd:restriction&gt;
</fo:block>



</fo:block>
</fo:list-item-body>
</fo:list-item>


<fo:list-item id="'generate_id()'" space-before.optimum="8pt" hyphenate="true">
<fo:list-item-label end-indent="label-end()">
<fo:block text-align="start">4)</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>If <fo:inline font-style="italic">MAX</fo:inline> is less than 2<fo:inline baseline-shift="super" font-size="smaller">63</fo:inline>-1
(9,223,372,036,854,775,807) but greater than 2<fo:inline baseline-shift="super" font-size="smaller">31</fo:inline>-1
(2,147,483,647) and <fo:inline font-style="italic">MIN</fo:inline> is less than 0 (zero) or
<fo:inline font-style="italic">MIN</fo:inline> is greater than -2<fo:inline baseline-shift="super" font-size="smaller">63</fo:inline>
(-9,223,372,036,854,775,808) but less than -2<fo:inline baseline-shift="super" font-size="smaller">31</fo:inline>
(-2,147,483,648), then <fo:inline font-style="italic">REST</fo:inline> is:


<fo:block space-before="-3pt" space-after="-3pt" font="9pt Courier" white-space-treatment="preserve" linefeed-treatment="preserve" white-space-collapse="false">
&lt;xsd:restriction base="xsd:long"&gt;
  <fo:inline font-style="italic">FACETMAX</fo:inline>
  <fo:inline font-style="italic">FACETMIN</fo:inline>
&lt;/xsd:restriction&gt;
</fo:block>



</fo:block>
</fo:list-item-body>
</fo:list-item>


<fo:list-item id="'generate_id()'" space-before.optimum="8pt" hyphenate="true">
<fo:list-item-label end-indent="label-end()">
<fo:block text-align="start">5)</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>If <fo:inline font-style="italic">MAX</fo:inline> is equal to 2<fo:inline baseline-shift="super" font-size="smaller">31</fo:inline>-1 (2,147,483,647)
and <fo:inline font-style="italic">MIN</fo:inline> is equal to -2<fo:inline baseline-shift="super" font-size="smaller">31</fo:inline> (-2,147,483,648), then
<fo:inline font-style="italic">REST</fo:inline> is:


<fo:block space-before="-3pt" space-after="-3pt" font="9pt Courier" white-space-treatment="preserve" linefeed-treatment="preserve" white-space-collapse="false">
&lt;xsd:restriction base="xsd:int"/&gt;
</fo:block>



</fo:block>
</fo:list-item-body>
</fo:list-item>


<fo:list-item id="'generate_id()'" space-before.optimum="8pt" hyphenate="true">
<fo:list-item-label end-indent="label-end()">
<fo:block text-align="start">6)</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>If <fo:inline font-style="italic">MAX</fo:inline> is less than 2<fo:inline baseline-shift="super" font-size="smaller">31</fo:inline>-1 (2,147,483,647)
and <fo:inline font-style="italic">MIN</fo:inline> is equal to -2<fo:inline baseline-shift="super" font-size="smaller">31</fo:inline> (-2,147,483,648), then
<fo:inline font-style="italic">REST</fo:inline> is:


<fo:block space-before="-3pt" space-after="-3pt" font="9pt Courier" white-space-treatment="preserve" linefeed-treatment="preserve" white-space-collapse="false">
&lt;xsd:restriction base="xsd:int"&gt;
  <fo:inline font-style="italic">FACETMAX</fo:inline>
&lt;/xsd:restriction&gt;
</fo:block>



</fo:block>
</fo:list-item-body>
</fo:list-item>


<fo:list-item id="'generate_id()'" space-before.optimum="8pt" hyphenate="true">
<fo:list-item-label end-indent="label-end()">
<fo:block text-align="start">7)</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>If <fo:inline font-style="italic">MAX</fo:inline> is equal to 2<fo:inline baseline-shift="super" font-size="smaller">31</fo:inline>-1 (2,147,483,647)
and <fo:inline font-style="italic">MIN</fo:inline> is greater than -2<fo:inline baseline-shift="super" font-size="smaller">31</fo:inline> (-2,147,483,648),
then <fo:inline font-style="italic">REST</fo:inline> is:


<fo:block space-before="-3pt" space-after="-3pt" font="9pt Courier" white-space-treatment="preserve" linefeed-treatment="preserve" white-space-collapse="false">
&lt;xsd:restriction base="xsd:int"&gt;
  <fo:inline font-style="italic">FACETMIN</fo:inline>
&lt;/xsd:restriction&gt;
</fo:block>



</fo:block>
</fo:list-item-body>
</fo:list-item>


<fo:list-item id="'generate_id()'" space-before.optimum="8pt" hyphenate="true">
<fo:list-item-label end-indent="label-end()">
<fo:block text-align="start">8)</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>If <fo:inline font-style="italic">MAX</fo:inline> is less than 2<fo:inline baseline-shift="super" font-size="smaller">31</fo:inline>-1 (2,147,483,647)
but greater than 2<fo:inline baseline-shift="super" font-size="smaller">15</fo:inline>-1 (32,767) and <fo:inline font-style="italic">MIN</fo:inline> is less
than 0 (zero) or <fo:inline font-style="italic">MIN</fo:inline> is greater than -2<fo:inline baseline-shift="super" font-size="smaller">31</fo:inline>
(-2,147,483,648) but less than -2<fo:inline baseline-shift="super" font-size="smaller">15</fo:inline> (-32,786), then
<fo:inline font-style="italic">REST</fo:inline> is:


<fo:block space-before="-3pt" space-after="-3pt" font="9pt Courier" white-space-treatment="preserve" linefeed-treatment="preserve" white-space-collapse="false">
&lt;xsd:restriction base="xsd:int"&gt;
  <fo:inline font-style="italic">FACETMAX</fo:inline>
  <fo:inline font-style="italic">FACETMIN</fo:inline>
&lt;/xsd:restriction&gt;
</fo:block>



</fo:block>
</fo:list-item-body>
</fo:list-item>


<fo:list-item id="'generate_id()'" space-before.optimum="8pt" hyphenate="true">
<fo:list-item-label end-indent="label-end()">
<fo:block text-align="start">9)</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>If <fo:inline font-style="italic">MAX</fo:inline> is equal to 2<fo:inline baseline-shift="super" font-size="smaller">15</fo:inline>-1 (32,767) and
<fo:inline font-style="italic">MIN</fo:inline> is equal to -2<fo:inline baseline-shift="super" font-size="smaller">15</fo:inline> (-32,786), then
<fo:inline font-style="italic">REST</fo:inline> is:


<fo:block space-before="-3pt" space-after="-3pt" font="9pt Courier" white-space-treatment="preserve" linefeed-treatment="preserve" white-space-collapse="false">
&lt;xsd:restriction base="xsd:short"/&gt;
</fo:block>



</fo:block>
</fo:list-item-body>
</fo:list-item>
-------------- next part --------------
========================================================================
Jim Melton --- Editor of ISO/IEC 9075-* (SQL)     Phone: +1.801.942.0144
Oracle Corporation            Oracle Email: mailto:jim.melton at oracle.com
1930 Viscounti Drive          Standards email: mailto:jim.melton at acm.org
Sandy, UT 84093-1063              Personal email: mailto:jim at melton.name
USA                                                Fax : +1.801.942.3345
========================================================================
=  Facts are facts.  However, any opinions expressed are the opinions  =
=  only of myself and may or may not reflect the opinions of anybody   =
=  else with whom I may or may not have discussed the issues at hand.  =
========================================================================


More information about the Xep-support mailing list