贴一下生成的test.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<?asciidoc-toc?>
<?asciidoc-numbered?>
<article lang="en">
<articleinfo>
<title>Title</title>
<author>
<firstname>title</firstname>
</author>
<authorinitials>T</authorinitials>
</articleinfo>
<section id="_section_1">
<title>Section 1</title>
<section id="_section_1_1">
<title>Section 1.1</title>
<simpara>Section 1.1</simpara>
</section>
<section id="_section_1_2">
<title>Section 1.2</title>
</section>
</section>
<section id="_section_2">
<title>Section 2</title>
<section id="_section_2_1">
<title>Section 2.1</title>
<section id="_section_2_1_1">
<title>Section 2.1.1</title>
<simpara>Section 2.1.1</simpara>
</section>
</section>
</section>
</article>
xmllint --nonet --noout --valid --debug test.xml结果如下,哪位帮忙看看:
test.xml:22: element section: validity error : Element section content does not follow the DTD, expecting (sectioninfo? , (title , subtitle? , titleabbrev?) , (toc | lot | index | glossary | bibliography)* , (((calloutlist | glosslist | bibliolist | itemizedlist | orderedlist | segmentedlist | simplelist | variablelist | caution | important | note | tip | warning | literallayout | programlisting | programlistingco | screen | screenco | screenshot | synopsis | cmdsynopsis | funcsynopsis | classsynopsis | fieldsynopsis | constructorsynopsis | destructorsynopsis | methodsynopsis | formalpara | para | simpara | address | blockquote | graphic | graphicco | mediaobject | mediaobjectco | informalequation | informalexample | informalfigure | informaltable | equation | example | figure | table | msgset | procedure | sidebar | qandaset | task | anchor | bridgehead | remark | highlights | abstract | authorblurb | epigraph | indexterm | beginpage)+ , (refentry* | section* | simplesect*)) | refentry+ | section+ | simplesect+) , (toc | lot | index | glossary | bibliography)*), got (title )
</section>
^
【 在 allnew (山杜鹃) 的大作中提到: 】
: 发信人: allnew (山杜鹃), 信区: LinuxApp
: 标 题: asciidoc转pdf过程中遇到xmllint的出错
: 发信站: 水木社区 (Mon Jun 6 16:21:58 2011), 站内
: ...................
--
FROM 218.1.140.*