xsl-list
[Top] [All Lists]

[xsl] Text Wrap/Overhang

2007-04-30 10:07:21
Hi All,

I am not having any luck getting numerical text to wrap in table columns.
This is in PDF output using XSL-FO. I used the "wrap-option" attribute
with value "wrap" (wrap-option="wrap") and this doesn't change the right
overhang issue that I getting in the display. Does anyone know how I can
resolve this issue?

Thanks in advance for your help!

Reagards,
Horace Burke


<!--===XSL SNIPPET==-->
<xsl:template match="CompInfo">
  <fo:table-and-caption space-before="1.3em">
     <fo:table border="1pt solid black">
       <xsl:if test="descendant::HazClassiftitle">
         <fo:table-column column-width="20.5%"/>
         <fo:table-column column-width="12%"/>
         <fo:table-column column-width="12%"/>
         <fo:table-column column-width="13%"/>
         <fo:table-column column-width="0.5%"/>
         <fo:table-column column-width="14%"/>
         <fo:table-column column-width="14%"/>
         <fo:table-column column-width="14%"/>
       </xsl:if>
       <fo:table-header>
          <fo:table-row>
             <fo:table-cell border-style="solid" border-width="1.5pt" 
border-bottom="1.5pt" border-left="1.5pt" border-right="1.5pt"
padding-top="2.5mm" padding-bottom="2.5mm" number-columns-spanned="8">
                 <fo:block font-weight="bolder">
                    <xsl:apply-templates select="title" mode="TitleFontSize14"/>
                 </fo:block><!--Section 3 Title-->
             </fo:table-cell>
          </fo:table-row>
       </fo:table-header>
       <fo:table-body>
         ...
         <fo:table-cell border-style="solid" border-width="1pt"
border-top="none" border-bottom="none" border-left="1pt"
border-right="1pt" padding-top="2mm" padding-bottom="2mm"
text-align="center">
           <fo:block start-indent=".3em">
<!--===THE "CompEU" TEMPLATE BELOW WITH "WRAP-OPTION" ATTRIBUTE IS APPLIED
HERE.===-->          
             <xsl:apply-templates select="HazClassif/CompEU"/>
           </fo:block>
         </fo:table-cell>
         ...
       </fo:table-body>
     </fo:table>
  </fo:table-and-caption>
</xsl:template>


<!--===THIS IS THE TEMPLATE WITH THE WRAP-OPTION ATTRIBUTE AND IT IS
APPLIED IN THE "CompInfo" TEMPLATE ABOVE.===-->
<xsl:template match="CompEU">
  <fo:block font-size="11pt" wrap-option="wrap" break-after="auto">
     <xsl:choose>
       <xsl:when test="@noTrans='yes'">
         <fo:inline color="#0000FF">
           <xsl:apply-templates/>
         </fo:inline>
       </xsl:when>
       <xsl:when test="@change='yes'">
         <fo:inline color="#FF0000">
           <xsl:apply-templates/>
         </fo:inline>
       </xsl:when>
       <xsl:otherwise>
         <xsl:apply-templates/>
       </xsl:otherwise>
     </xsl:choose>
  </fo:block>            
</xsl:template>
 
 
<!--===XML SNIPPET==-->
 
<HazClassif>
<CompEU>Xn;R37/38,41-42</CompEU>
...
</HazClassif>

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>
  • [xsl] Text Wrap/Overhang, Horace Burke <=