按照此处提到的步骤进行操作:http://docbook.sourceforge.net/release/xsl/current/webhelp/docs/ch02s01.html
ant webhelp -Doutput-dir=test-ouput
(ouput是我认为的文档中的拼写错误,但我使用test-ouput
和test-output
对其进行了测试,结果相同)
使用
进行测试知道我应该关注什么?
输出:
Buildfile: D:\apps\docbook-xsl-1.78.1\webhelp\build.xml
validate:
clean:
[delete] Deleting directory D:\apps\docbook-xsl-1.78.1\webhelp\test-ouput
chunk:
[mkdir] Created dir: D:\apps\docbook-xsl-1.78.1\webhelp\test-ouput
[xslt] Processing D:\apps\docbook-xsl-1.78.1\webhelp\docsrc\readme.xml to D:\apps\docbook-xsl-1.78.1\webhelp\test-ouput\null2007605189
[xslt] Loading stylesheet D:\apps\docbook-xsl-1.78.1\profiling\profile.xsl
[xslt] Processing D:\apps\docbook-xsl-1.78.1\webhelp\test-ouput\null2007605189 to D:\apps\docbook-xsl-1.78.1\webhelp\test-ouput\null295245132
[xslt] Loading stylesheet D:\apps\docbook-xsl-1.78.1\webhelp\xsl\webhelp.xsl
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/autoidx.xsl: line 551: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/autoidx.xsl: line 600: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/autoidx.xsl: line 600: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/autoidx.xsl: line 624: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/autoidx.xsl: line 624: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/lists.xsl: line 815: Attribut 'type' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/callout.xsl: line 109: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/xref.xsl: line 181: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/xref.xsl: line 966: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/inline.xsl: line 96: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/inline.xsl: line 96: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/inline.xsl: line 131: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/inline.xsl: line 131: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/inline.xsl: line 171: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/inline.xsl: line 171: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/inline.xsl: line 707: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/inline.xsl: line 924: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/inline.xsl: line 1041: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/inline.xsl: line 1171: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/inline.xsl: line 1171: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/inline.xsl: line 1271: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/inline.xsl: line 1309: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/glossary.xsl: line 329: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/glossary.xsl: line 329: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/glossary.xsl: line 402: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/glossary.xsl: line 402: Attribut 'href' befindet sich nicht in einem Element.
[xslt] : Warning! file:/D:/apps/docbook-xsl-1.78.1/xhtml/annotations.xsl: line 106: Attribut 'onClick' befindet sich nicht in einem Element.
[xslt] : Error! null
[xslt] Failed to process D:\apps\docbook-xsl-1.78.1\webhelp\test-ouput\null2007605189
BUILD FAILED
D:\apps\docbook-xsl-1.78.1\webhelp\build.xml:62: javax.xml.transform.TransformerException: java.lang.NullPointerException
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:716)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
at org.apache.tools.ant.taskdefs.optional.TraXLiaison.transform(TraXLiaison.java:194)
at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:852)
at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:388)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.NullPointerException
at com.sun.org.apache.xalan.internal.xsltc.runtime.BasisLibrary.referenceToNodeSet(BasisLibrary.java:998)
at webhelp.l10n$dot$language()
at webhelp.topLevel()
at webhelp.transform()
at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:603)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:709)
... 21 more
---------
java.lang.NullPointerException
at com.sun.org.apache.xalan.internal.xsltc.runtime.BasisLibrary.referenceToNodeSet(BasisLibrary.java:998)
at webhelp.l10n$dot$language()
at webhelp.topLevel()
at webhelp.transform()
at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:603)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:709)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
at org.apache.tools.ant.taskdefs.optional.TraXLiaison.transform(TraXLiaison.java:194)
at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:852)
at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:388)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Total time: 13 seconds
答案 0 :(得分:3)
基于堆栈跟踪,您似乎正在使用Xalan进行xsl转换。建议将Saxon 6.5.5与Webhelp一起使用,这也是一个Java impl。您可以通过将build.properties中的xslt-processor-classpath设置为撒克逊jar的位置来指向Saxon。同时,您还应该设置xercesImpl.jar和xml-apis.jar属性。
在webhelp build.properties中修改以下内容,使它们指向您的本地 罐子的副本表明:
xml-commons:xml-apis.jar
XSLT处理器的类路径= / USR /共享/爪哇/撒克逊6.5.5.jar
xercesImpl.jar =的/ usr /共享/爪哇/ xercesImpl.jar
的xml-apis.jar =的/ usr /共享/ JAVA / XML的apis.jar
答案 1 :(得分:0)
非常重要
build.properties
xslt-processor-classpath=d:\\apps\\saxon\\saxon.jar
xercesImpl.jar=d:\\apps\\xerces\\xercesImpl.jar;d:\\apps\\saxon\\saxon.jar
xml-apis.jar=d:\\apps\\xerces\\xml-apis.jar
从xercesImpl...
开始的行需要对saxon.jar的附加引用才能使用更大的xml输入文件。