取消vim在编辑xml文档时的自动缩进功能

使用XXE作为DocBook图形化编辑器

lyanry posted @ 2007年11月06日 18:02 in 开发工具 with tags xxe DocBook , 12599 阅读

修订:目前 XMLmind XML Editor 最新版本为 3.7.1,但是下文所述的安装过程依然适用。

前言

我接触 DocBook 快有一年了,在这期间曾经使它写过一些小型的文档。我使用的 DocBook 工具集主要有 Vim+XML 扩展、xsltproc 转换器(转换为 HTML)、Bash(写比较自动化一点的 DocBook 文档转换脚本)。这样的日子倒也清淡,也不感觉在 Vim 里打那些 DocBook 标记有多么繁琐。但是,后来我开始使用 TeX 来写文档,在 TeX 标记的简练的衬托下,DocBook 那一堆又臭又长的 XML 标记逐渐让我心生厌倦。人阿,就是这样不容易满足。

在网上闲逛,发现了一个叫做 XMLmind XML Editor (简称 XXE) 的工具,可以所见即所得地编辑各种 XML 文档,其最显著的应用是编辑 DocBook 格式文档。一时心动,就试用了。

安装

XXE 是用 Java 写的,所以你应当知道它是可以跨平台使用的,也应当知道在安装它之前,你的系统应该已安装了 Java 运行时库 1.4.1 或更高版本。对于 Gentoo 用户,如果系统中尚未安装 Java 运行时库,可以参考 Gentoo Java Guide,这是篇英文文档,如果你是热心的人,可以把它翻译成中文,详情可见 Gentoo 文档中文翻译规则。如果你是其它 Linux 发行版用户,可以 Google 一下有关文档。

我的系统是 Gentoo Linux,所以首先去 Portage 里找了找,果然有的, emerge -pv xxe 。不过,emerge 到的 XXE 版本是 3.5.2,而目前最新版本是 3.6.2,详情可见 XXE 官方网站

如果你和我一样都比较喜欢使用最新版的软件包,那么可以在 XXE 官方网站上下载 XXE 3.6.2。

但是在下载之前,应当明白 XXE 的使用许可协议。目前,XXE 有两种使用许可协议。第一种许可协议允许用户免费使用 XXE 个人版,不开放源码,不能对 XML 文档进行转换(转换为 HTML、XHTML、PDF 等格式)。第二种许可协议是企业版,要求付费使用,开放源码,提供 XXE 全部功能。

我选择使用 XXE 个人版。不开源,不要紧,因为我从来也不打算参与这一项目;不能进行文档格式转换也不要紧,可以配合一些自由使用的转换器(xsltproc、XSL-FO 等)来用。

XXE 个人版下载页面 上下载 xxe-perso-3_6_2.tar.gz。

下载 xxe-perso 包后,将它解压到自己所喜欢的某个目录下,即完成了安装。我是喜欢将自行安装的软件包放在 /opt 目录下,安装后的目录如下图所示:

xxe 目录结构

安装后,要运行 XXE,可以从终端中进入 XXE 安装目录下的 bin 目录,执行 xxe。为了方便起见,可以在桌面上建立相应的连接。

XXE GUI 的中文语言包

先下载 XXE GUI 菜单的中文语言包,该语言包是白建鹏翻译的。

将该语言包解包后,放到 XXE 安装目录的 addon 子目录下,然后启动 XXE,其图形化界面就自动切换为中文语言环境了,如下图。

配置

打开 XXE 选项菜单中的“选项”,即可打开 XXE 配置对话框。

XXE 默认配置中没有设置中文自动换行,另外对于 XXE 编辑器内文档的字体、字号也需要真对自己的喜好进行一些设定,它们可以在 XXE 配置对话框的 “查看” 项中进行设定。我的设定如下图所示。

至于其它配置,根据自己的具体情况自行尝试设定吧。

使用 XXE 编辑 DocBook

如果要使用 XXE 编辑 DocBook 文档,可打开“文件”菜单中的“新建”,开启新建文档类型选择对话框,在其中选择所要建立的文档类型即可进入文档编辑环境。

至于 XXE 文档编辑环境的使用,我没有耐心一一讲述,稍微尝试一下应该很容易上手的。如有不解,就查阅 XXE 帮助文档。

XXE 个人版不能处理 XML 文档的转换,所以对于写好的 DocBook 文档,保存一下,然后可以使用 xsltproc 将其处理成 HTML 文档,可参考我以前写的一篇日志

Avatar_small
alee 说:
2007年11月20日 05:52 我连 xxe 都无法下载, 点了 tar.gz 从此 没有回应。
Avatar_small
lyanry 说:
2007年11月20日 07:47 那个网站的确很慢,我下了好久。
Avatar_small
yanzixiang 说:
2007年12月12日 23:21 想要一个你说的那个语言包。 yanzixiangnande@gmail.com 3x
Avatar_small
lyanry 说:
2007年12月14日 16:45 I have sent it to you.
Avatar_small
enochzytian 说:
2008年1月03日 19:18 需要你说的语言包。zytian@gmail.com 3x 不能还能否给个对应的xxe的.tgz文件或是文件链接?
Avatar_small
lyanry 说:
2008年1月15日 07:25 XMLmind 3.6.2(包含中文语言包)下载: http://pickup.mofile.com/1688975744037386
Avatar_small
qq 说:
2008年5月19日 23:46 使用代理可以下载的。
Avatar_small
Religion & Theolog 说:
2020年2月27日 19:36

When students seek Religion and Theology Writing Services, they are assured of receiving Religion and Theology Research Paper Writing Services and Religion and Theology Essay Writing Services that meets all their writing needs.

Avatar_small
Cyber Security Inter 说:
2022年8月10日 03:14

One thing you should understand is that there is no precise and standalone site where you will be able to find only Cyber Security Internships right away. But we have found some of the best sites online that you will be able to browse to find out the best Internship option for the Cyber Security role. <a href="https://99-networks.com/cyber-security-internships/">Cyber Security Internships</a> Cyber Security is a broader term coined into to understand the main role of security maintenance of the IT companies when it comes to the Cyber unit, which is the cloud connection.

Avatar_small
Cyber Security Inter 说:
2022年8月10日 03:14

One thing you should understand is that there is no precise and standalone site where you will be able to find only Cyber Security Internships right away. But we have found some of the best sites online that you will be able to browse to find out the best Internship option for the Cyber Security role. Cyber Security Internships Cyber Security is a broader term coined into to understand the main role of security maintenance of the IT companies when it comes to the Cyber unit, which is the cloud connection.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter