Re: [dita-ot-dev] How to configure my plug-in as print type?

47 views
Skip to first unread message

Radu Coravu

unread,
Nov 25, 2014, 3:32:35 AM11/25/14
to dita-...@googlegroups.com
Hi Toshihiko,

I took a look at your plugin and it seems to be properly built.
Your plugin.xml advertises itself as a print plugin using:

<feature extension="dita.transtype.print" value="pdf5"/>

After the integrator is run, if you look in the "DITA-OT\lib\org.dita.dost.platform\plugin.properties", it will be changed to also list the "pdf5" plugin as a print transtype:

print_transtypes=pdf2;pdf;pdf5;legacypdf;d4pjournals;odt

But there's a problem, in the DITA OT folder there is a JAR library:

DITA-OT\lib\dost-configuration.jar

which contains an older copy of the plugin.properties.
For example if you rename that JAR to have some other extension, your plugin should be interpreted as a print-type plugin.
I'm not sure what the intention was with that "dost-configuration.jar" there, I will try to get some feedback from Jarno Elovirta, ideally the integrator would also re-build the JAR.

Regards,
Radu

On Sat, Nov 22, 2014 at 6:07 PM, Toshihiko Makita <toshihik...@gmail.com> wrote:
Hi All,

I have a my PDF plug-in that have following plugin.xml

<?xml version="1.0" encoding="UTF-8"?>
<plugin id="com.antennahouse.pdf5">
 
<feature extension="dita.conductor.transtype.check" value="pdf5" type="pdf"/>
 
<feature extension="dita.conductor.target.relative" value="integrator.xml" type="file"/>
 
<feature extension="dita.transtype.print" value="pdf5"/>
</plugin>

According to the DITA Open Toolkit Developer Reference I think it is enough.

But if I build the following map, topics/p_print_printonly.xml is rejected from "gen-list" processing. As a result several errors occured in the [mappull] process.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE bookmap PUBLIC "-//OASIS//DTD DITA BookMap//EN" "bookmap.dtd">
<bookmap id="bookmap_26F29B320CC448C6BDEE032B001C3627" xml:lang="en-US">
   
<booktitle>
       
<mainbooktitle>Printonly test</mainbooktitle>
       
<booktitlealt>Unit test cases</booktitlealt>
   
</booktitle>
   
<chapter navtitle="Printonly test">
       
<topicref href="topics/p_print_yes.xml" type="topic" format="dita" id="topicref_001" print="yes"/>
       
<topicref href="topics/p_print_no.xml" type="topic" format="dita" id="topicref_002" print="no"/>
       
<topicref href="topics/p_print_printonly.xml" type="topic" format="dita" id="topicref_003" print="printonly"/>
   
</chapter>
</bookmap>  




gen-list:
 
[gen-list] GenMapAndTopicListModule.execute(): Starting...
 
[gen-list] Using Xerces grammar pool for DTD and schema caching.
 
[gen-list] Processing D:\My_Documents\pdf5\testdata\20141122_printonly\sample_printonly.ditamap
 
[gen-list] Processing D:\My_Documents\pdf5\testdata\20141122_printonly\topics\p_print_yes.xml
 
[gen-list] Processing D:\My_Documents\pdf5\testdata\20141122_printonly\topics\p_print_no.xml
 
[gen-list] Serializing job specification
 
[gen-list] 11 23, 2014 12:50:01 午前 java.util.prefs.WindowsPreferences <init>
 
[gen-list] WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
 
[gen-list] GenMapAndTopicListModule.execute(): Execution time: 0.923 seconds


mappull:
 
[mappull] Transforming into D:\My_Documents\pdf5\testdata\20141122_printonly\temp
 
[mappull] Processing D:\My_Documents\pdf5\testdata\20141122_printonly\temp\sample_printonly.ditamap to D:\My_Documents\pdf5\testdata\20141122_printonly\temp\sample_printonly.ditamap.pull
 
[mappull] Loading stylesheet D:\DITA-OT\DITA-OT1.8.5\xsl\preprocess\mappull.xsl
 
[mappull] D:\DITA-OT\DITA-OT1.8.5\xsl\preprocess\mappullImpl.xsl:446: Error! I/O error reported by XML parser processing file:/D:/My_Documents/pdf5/testdata/20141122_printonly/temp/topics/p_print_printonly.xml: D:\My_Documents\pdf5\testdata\20141122_printonly\temp\topics\p_print_printonly.xml (指定されたファイルが見つかりません。) Cause: java.io.FileNotFoundException: D:\My_Documents\pdf5\testdata\20141122_printonly\temp\topics\p_print_printonly.xml (指定されたファイルが見つかりません。)
 
[mappull] D:\DITA-OT\DITA-OT1.8.5\xsl\preprocess\mappullImpl.xsl:537: Error! Document has been marked not available: file:/D:/My_Documents/pdf5/testdata/20141122_printonly/temp/topics/p_print_printonly.xml
 
[mappull] [DOTX023W][WARN]: Unable to retrieve navtitle from target: 'topics/p_print_printonly.xml'.  The location of this problem was at (File = D:\My_Documents\pdf5\testdata\20141122_printonly\sample_printonly.ditamap, Element = topicref:3;11:119)
 
[mappull] D:\DITA-OT\DITA-OT1.8.5\xsl\preprocess\mappullImpl.xsl:815: Error! Document has been marked not available: file:/D:/My_Documents/pdf5/testdata/20141122_printonly/temp/topics/p_print_printonly.xml
 
[mappull] [DOTX027W][WARN]: Unable to retrieve linktext from target: 'topics/p_print_printonly.xml'.  The location of this problem was at (File = D:\My_Documents\pdf5\testdata\20141122_printonly\sample_printonly.ditamap, Element = topicref:3;11:119)
 
[mappull] D:\DITA-OT\DITA-OT1.8.5\xsl\preprocess\mappullImpl.xsl:938: Error! Document has been marked not available: file:/D:/My_Documents/pdf5/testdata/20141122_printonly/temp/topics/p_print_printonly.xml
     
[move] Moving 1 file to D:\My_Documents\pdf5\testdata\20141122_printonly\temp


Are there any mistakes in my plug-in setting?

- My plug-in can be downloaded from GitHub.

- I attached test data and log file.
  20141122_printonly.zip

Please give me your advice.

Regards,

Toshihiko Makita

--
You received this message because you are subscribed to the Google Groups "DITA-OT Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dita-ot-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Toshihiko Makita

unread,
Nov 26, 2014, 6:54:53 AM11/26/14
to dita-...@googlegroups.com
Sorry for my miss post.
This article should be written in DITA-OT Users forum.
I will answer in DITA-OT Users later.

Toshihiko Makita
Reply all
Reply to author
Forward
0 new messages