depend.preprocess.post plugin example

Post here questions and problems related to editing and publishing DITA content.
gbv34
Posts: 105
Joined: Thu Jan 20, 2022 12:36 pm

depend.preprocess.post plugin example

Post 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 ?
------
Gaspard
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: depend.preprocess.post plugin example

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply