我需要的步驟DITA轉換爲Word的過程中的氧鏈接,我需要的步驟如何使用DITA OT DITA插件名爲com.elovirta.ooxml使用被稱爲使用<a href="https://github.com/jelovirt/com.elovirta.ooxml" rel="nofollow noreferrer">this</a><strong>com.elovirta.ooxml</strong>插件名稱轉換爲Word中的氧
輸入迪塔xml文件是:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
PUBLIC "urn:pubid:doctypes:dita:topic" "topic.dtd">
<topic id="d63e3" xml:lang="en-US" outputclass="Student_Notebook">
<title outputclass="Title">Student Notebook</title>
<body>
<section outputclass="Handout"><title>Labs Student Notebook
1</title><p outputclass="SC_P_Large_Center">Module 1</p><p
outputclass="SC_P_Large_Center">Literacy Labs</p><p outputclass="SC_P_Large_Center">Student
Notebook</p><p outputclass="SC_P_Medium">________________ _______________ _______________
_______________ </p></section>
</body>
</topic>
我試圖通過DITA-OT 2.1.0,安裝的三個插件com.elovirta.ooxml,org.dita.base,org.dita後。因爲這三個插件相互依賴,所以我安裝了三個插件。在com.elovirta.ooxml這樣 plugin.xml的代碼中提到:
<?xml version="1.0" encoding="UTF-8"?>
<plugin id="com.elovirta.ooxml">
<require plugin="org.dita.pdf2"/>
<feature extension="dita.conductor.transtype.check" value="docx"/>
<feature extension="dita.transtype.print" value="docx"/>
<feature extension="dita.conductor.target.relative" file="integrator.xml"/>
</plugin>
所以我已經安裝了三個插件。從那以後,我在命令提示符都拼命地跑的命令是這樣的:
在改造方案,我選擇了DITA OT:
C:\DITA-OT\dita-ot-2.1.0-dita2word>ant -f integrator.xml Buildfile: C:\DITA-OT\dita-ot-2.1.0-dita2word\integrator.xml strict: integrate: [jar] Building jar: C:\DITA-OT\dita-ot-2.1.0-dita2word\lib\dost-configuration.jar BUILD SUCCESSFUL Total time: 0 seconds
是
後,我已經在氧氣完成這一過程轉化,
轉化類型我選擇了,
個我並沒有改變屏幕下方所示的任何參數
3分出手
點擊確定按鈕,我已經創建的方案改造後的運行我得到這個錯誤:
Description: [DOTJ025E] The input to the "topic merge" transform process could not be found. Correct any earlier transform errors and try the build again, or see the DITA-OT User Guide for additional causes.
所以我試着用插件後的dita-ot-2.4.1更新的版本n安裝,我運行命令:
C:\DITA-OT\dita-ot-2.4.1>ant -f integrator.xml
Buildfile: C:\DITA-OT\dita-ot-2.4.1\integrator.xml
integrate:
BUILD FAILED
C:\DITA-OT\dita-ot-2.4.1\integrator.xml:43: java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableSet
at org.dita.dost.platform.Integrator.<clinit>(Integrator.java:79)
at org.dita.dost.platform.IntegratorTask.execute(IntegratorTask.java:32)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.Main.runBuild(Main.java:854)
at org.apache.tools.ant.Main.startAnt(Main.java:236)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.ImmutableSet
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1388)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1337)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1089)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 19 more
Total time: 0 seconds
我得到這個錯誤,所以我沒有使用DITA OT較新的版本。
做的過程中混帳此命令後後
$ ./dita --input=/E/SampleFile.dita -f docx
我得到的錯誤爲:
[pipeline] Error at xsl:element on line 64 of topicmergeImpl.xsl:
[pipeline] XTDE0820: Invalid element name. Invalid QName {}
[pipeline] in built-in template rule
Error: Failed to run pipeline: Failed to process merged topics: Invalid element name. Invalid QName {}
請給我提供建議,以解決此錯誤,以及高達dita2word轉換。
由於提前
'輸入' 格式? ./dita --E:/Batch_4.dita ../docsrc/userguide-book.ditamap -f docx 這是正確的方法嗎? – User515
不,您可以在文檔中找到參數參考: http://www.dita-ot.org/2.4/user-guide/build-using-dita-command.html –
如果我的回答對您有幫助,請接受它。 –