Re: [ditac] Changing cell alignment in DOCX output headers
Hussein Shafie <[email protected]>
| Newsgroups | gmane.text.xml.xfc.general |
|---|---|
| Organization | XMLmind |
| Message-ID | <[email protected]> |
My mistake: in my previous post I've typed "bottom" instead of "after". The correct value for attribute "display-align" is "after", not "bottom". On 12/04/2013 12:08 AM, Julie McHam wrote: > > Currently, when I transform DITA source files to DOCX output using the > XMLmind XSL Utility, the text in the headers is aligned at the bottom of > the table cells in the header. (The left side is the document title; the > right side is the document chapter.) Some chapters have long titles and > wrap around to a second line. It would look better if both the document > title and chapter title were aligned at the top of the table cells. What > do I need to change to accomplish this? Please customize the XSLT stylesheet which generates XSL-FO and then .docx as explained in "Customizing a stock XSLT stylesheet". See http://www.xmlmind.com/foconverter/_distrib/doc/help/com.xmlmind.xslutil.ConversionEditor.html#customizing_xslt Using a recent version of XMLmind XSL Utility, this can be done from within the application without having to hand-edit any file. You'll have to modify the "header-left", "header-center" and "header-right" attribute-sets by adding the following attribute: display-align to value: after See attached screenshot. display-align reference is found here: http://www.w3.org/TR/xsl/#display-align --- PS: I've also attached to this email the XSLT stylesheet customization file which has been generated for me by XMLmind XSL Customizer, the helper application invoked by XMLmind XSL Utility. -- XMLmind FO Converter Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xfc-support
add_display_align_bottom.png
(image/png, 136.9 KB) - not displayed
custom_fo.xsl
(text/x-xsl, 1.6 KB)
<?xml version="1.0" encoding="UTF-8"?>
<!--CREATED BY XMLmind XSL Customizer. PLEASE DO NOT EDIT BY HAND!-->
<?stylesheet-label ?>
<xsl:stylesheet exclude-result-prefixes="Date Highlight Image URI ditac u xs xslthl"
version="2.0" xmlns:xslthl="http://xslthl.sf.net"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xfc="http://www.xmlmind.com/foconverter/xsl/extensions"
xmlns:u="http://www.xmlmind.com/namespace/ditac"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rx="http://www.renderx.com/XSL/Extensions"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:ditac="http://www.xmlmind.com/ditac/schema/ditac"
xmlns:URI="java:com.xmlmind.ditac.xslt.URI"
xmlns:Image="java:com.xmlmind.ditac.xslt.Image"
xmlns:Highlight="java:com.xmlmind.ditac.xslt.Highlight"
xmlns:Date="java:com.xmlmind.ditac.xslt.Date">
<xsl:import href="xslutil-config:dita/xsl/fo/fo.xsl"/>
<xsl:attribute-set name="header-center">
<xsl:attribute name="display-align">after</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="header-left">
<xsl:attribute name="display-align">bottom</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="header-right">
<xsl:attribute name="display-align">after</xsl:attribute>
</xsl:attribute-set>
<!-- REDEFINE PARAMETERS AND ATTRIBUTE-SETS HERE -->
</xsl:stylesheet>