DocBook到Word的转换? [英] DocBook to Word Conversion?

查看:151
本文介绍了DocBook到Word的转换?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在将DocBook文件转换为Microsoft Word文件时,我需要一些帮助.

我需要XSL文件进行转换吗?

解决方案

是的,您确实需要XSL文件.您可以从免费的DocBook XML发行版中获取DocBook的XSL文件.然后,您运行一个免费的XSLT转换器,例如Saxon.如果从命令行运行Saxon,则为其指定DocBook文件的名称,并为其指定一个样式表的名称,它将根据样式表中的规则转换文件.

要转换为Word,您需要做的是选择正确的样式表.

从DocBook XSL:完整指南中,有三种可能性:

  • 转换为XSL-FO,然后使用XMLmind导出到Word.有关更多信息,请参见 XMLmind网站.
  • 使用一组有限的标签,然后使用DocBook XML随附的样式表之一输出到WordML.
  • 尝试使用Jfor输出到RTF,尽管似乎不再维护Jfor.

我有自己的一个:

  • 如上所述,使用DocBook XML随附的样式表之一发布到XSL-FO,然后运行Apache FOP将XSL-FO转换为RTF.您将丢失结构信息,但是将保留一定数量的格式.

I need some help with conversion of DocBook files to Microsoft Word files.

Do I need an XSL file for the transformation?

解决方案

Yes, you do need an XSL file. You can get XSL files for DocBook from the free DocBook XML distribution. Then, you run a free XSLT transformer such as Saxon. If you run Saxon from a command line, you give it the name of your DocBook file, and the name of one of the stylesheets, and it will transform your file according to the rules in the stylesheet.

What you need to do to transform to Word, is to pick the right stylesheet.

From DocBook XSL: The Complete Guide, here are three possibilities:

  • Convert to XSL-FO and then use the XMLmind to export to Word. See the XMLmind website for more information.
  • Use a limited set of tags and then use one of DocBook XML's included stylesheets to output to WordML.
  • Try to use Jfor to output to RTF, although Jfor no longer appears to be maintained.

And I have one of my own:

  • As above, use one of DocBook XML's included stylesheets to publish to XSL-FO, then run Apache FOP to convert from XSL-FO to RTF. You will lose the structural information, but you will keep a certain amount of the formatting.

这篇关于DocBook到Word的转换?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆