Re: XFC Stylefile
Hussein Shafie <[email protected]> Sat, 04 Apr 2015 11:55:09 +0200
| Newsgroups | gmane.text.xml.xfc.general |
|---|---|
| Message-ID | <[email protected]> |
On 04/04/2015 11:17 AM, Sascha Manns wrote: > > thank you very much. I prepared a style there: > http://pastebin.com/L5DiyHfb. I tried out to make the headings in > #d40032 and OfficinaBook-Sans as default font family. > > Then i've done these steps: > > * xmllint --noent --dropdtd --xinclude > Technische_Dokumentation_Reports.xml -o > Technische_Dokumentation_Reports-resolved.xml > * saxon-xslt -o Technische_Dokumentation_Reports.fo > Technische_Dokumentation_Reports-resolved.xml > /usr/share/xml/docbook/stylesheet/docbook-xsl-ns/fo/docbook.xsl > * fo2docx -styles=/home/sascha/repos/xsl/styles.xfc > Technische_Dokumentation_Reports.fo > > Technische_Dokumentation_Reports.docx > > My Document based on DocBook5. After the last step i got a docx without > red headings and Arial and Times font families. Maybe i missed anything? > I'm afraid that the answer is yes. Please carefully read the following --rather long-- answer because I'm not allowed to help you more than this (http://www.xmlmind.com/foconverter/support_policy.html). --> fo2docx argument -styles=/home/sascha/repos/xsl/styles.xfc is *completely* *useless* here as the DocBook XSLT styleheets, whether stock or modified, have no support whatsoever for our proprietary XSL-FO extension for generating named styles. Please carefully read http://www.xmlmind.com/foconverter/_distrib/doc/user/user_styles.html You'll find that there is no magic here, just hard, tedious work. We even stress the fact that: --- Retrofitting named styles support in an existing XSLT stylesheet which has been designed to generate XSL-FO for use by Apache FOP, RenderX XEP or Antenna House XSL Formatter (or XFC, but without named styles) is tedious and error prone. We strongly recommend to avoid doing this. --- See http://www.xmlmind.com/foconverter/_distrib/doc/user/user_styles_and_xslt.html --> Just having red headings and Arial and Times font families does not require you to use MS-Word named styles. A) Red headings are achieved by modifying attribute-sets such as: section.title.properties I mean, simply add: <xsl:attribute name="color">red</xsl:attribute> to this attribute-set. More information: http://docbook.sourceforge.net/release/xsl/current/doc/fo/section.title.properties.html B) Arial and Times font families are achieved using by passing a "font mapping" to fo2docx: -genericFontFamilies=sans-serif=Arial,monospace=Courier New More information: http://www.xmlmind.com/foconverter/_distrib/doc/user/command_line_java.html --> Note that we have created XMLmind XSL Utility precisely to relief our customers from the hassles of invoking xmllint+saxon+fo2docx. * XMLmind XSL Utility can be used to add <xsl:attribute name="color">red</xsl:attribute> to attribute-set section.title.properties without having to hand edit any XSLT file. See http://www.xmlmind.com/foconverter/_distrib/xslutil/doc/help/com.xmlmind.xslutil.ConversionEditor.html#customizing_xslt * XMLmind XSL Utility by default passes: -genericFontFamilies=serif=Times New Roman,sans-serif=Arial,monospace=Courier New to fo2docx. See "Process" tab in http://www.xmlmind.com/foconverter/_distrib/xslutil/doc/help/com.xmlmind.xslutil.ConversionEditor.html * XMLmind XSL Utility can be used as command-line utility. See http://www.xmlmind.com/foconverter/_distrib/xslutil/doc/help/running.html#command_line Please consider using XMLmind XSL Utility both to setup your DocBook 5 document conversion (labeled "db5ToDocx" in XMLmind XSL Utility) and then to execute it. -- XMLmind FO Converter Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xfc-support