Page 1 of 1

depend.preprocess.post plugin example

Posted: Wed Mar 08, 2023 3:57 pm
by gbv34
Hello, there!
I have a custom plugin whose purpose is to pull the resourceid values from chunked topics and merge them in the parent resourceid. It works fine when I apply an HTML5 transformation; however I'm stuck at this point because I use a delivery platform which processes content from the temporary source folder.

I currently use this extension point:
<feature extension="dita.xsl.html5" file="./xsl/main.xsl"/>
But I would like to do a test with another extension point: depend.preprocess.post
I edited this plugin.xml file:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<plugin id="com.xxxx.resourceids"> 
      <target name="custom-resourceids">
        <pipeline>
         <xslt basedir="${dita.temp.dir}"
              style="${dita.plugin.com.xxxx.resourceids.dir}/xsl/rewrite.xsl">
          <ditafileset format="dita"/>
         </xslt>
        </pipeline>
      </target>
      <feature extension="depend.preprocess.pre" value="custom-resourceids" />
</plugin>
But I'm still having an error message informing me the target doesn' exist.
By any chance, I wonder if you would you have a simple plugin example to share ?

Re: depend.preprocess.post plugin example

Posted: Wed Mar 08, 2023 7:08 pm
by Radu
Hi Gaspard,

The plugin.xml is not an ANT build file, you cannot paste an ANT<target> element inside it.
You can add a new feature to it pointing to a custom ANT build file which will be included in the main DITA OT ant build file:

Code: Select all

<plugin id="com.xxxx.resourceids"> 
  	  <feature extension="dita.conductor.target.relative" value="integrator.xml" type="file"/> 
      <feature extension="depend.preprocess.pre" value="custom-resourceids" />
</plugin> 
https://github.com/oxygenxml/dita-ot-me ... plugin.xml
https://github.com/oxygenxml/dita-ot-me ... grator.xml

Regards,
Radu