你好,请教关于docbook问题
HOME.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

你好,请教关于docbook问题


   我是计算机专业的学生,写文档不喜欢用word和其他的
字处理软件,所以一般都是用CSS+HTML。 但是这种做法
非常累。看到DOCBOOK后,我想写文档使用DOCBOOK。一个
重要原因是我对XML和相关的技术还是很熟悉的。
  下面是我的使用docbook的经历和困惑:

1. 
首先我没有使用SGML, 使用的是XML。DTD和XSL都下载且配置完毕。 
我使用的是apache xalan,使用中能工作,但是不完全是。有如下这样的错误:
D:\Project\docbook\bin>java -classpath ".;./xalan.jar;./xercesImple.jar;./xml-ap
is.jar;" org.apache.xalan.xslt.Process -in sample.xml -xsl ..\XSL\html\docbook.x
sl -out sample.html
 ...(省略)
[Error] synop.xsl:1009:38: Element type "xsl:apply-templates" must be declared.
[Error] synop.xsl:1014:65: Element type "xsl:template" must be declared.
[Error] synop.xsl:1015:53: Element type "xsl:variable" must be declared.
 ...(省略)

使用saxon就会出现错误:
D:\Project\docbook\bin>java -jar saxon7.jar sample.xml ..\XSL\html\docbook.xsl
Error at xsl:when on line 288 of file:/D:/Project/docbook/XSL/common/common.xsl:
  Cannot compare xs:integer to xs:string
Warning: at xsl:when on line 197 of file:/D:/Project/docbook/XSL/common/table.xs
l:
  Less-than and greater-than comparisons between strings have changed since XPat
h 1.0
Error at xsl:if on line 1595 of file:/D:/Project/docbook/XSL/html/titlepage.temp
lates.xsl:
...(省略)

其中,使用xalan能出来结果,也就是能生成sample.html, 使用saxon什么都没有。

问题到底出在那里?

2.
其实生成的sample.html中,对汉字支持很不好。我也使用过xsltproc, 汉字会出现乱码。所以,我使用的
三种方法(xalan,saxon,xslt)没有一种完全成功的。
请问你的xmldoc是使用什么工具生成的呢? 能否列一下清单和下载的URL。

谢谢!


徐建栋
2003-5-6