Copy resource files to output.dir for custom xhtml
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 156
- Joined: Sat Feb 26, 2005 12:09 am
- Location: USA
- Contact:
Copy resource files to output.dir for custom xhtml
Post by shudson310 »
Hi,
I am creating a custom plugin based on the xhtml plugin. The transform appears to be working, but I cannot get the resource files from my plugin to copy over to the output directory. I'm using DITA-OT 2.2.2 and have it configured properly in oXygenXML 17.1 to use that toolkit.
Here's my plugin.xml:
My conductor.xml:
My build file:
What am I missing? I can't seem to get the files to copy from my plugin/resource directory to the output directory.
Thanks,
--Scott
I am creating a custom plugin based on the xhtml plugin. The transform appears to be working, but I cannot get the resource files from my plugin to copy over to the output directory. I'm using DITA-OT 2.2.2 and have it configured properly in oXygenXML 17.1 to use that toolkit.
Here's my plugin.xml:
Code: Select all
<plugin id="com.company.xhtml">
<feature extension="dita.xsl.xhtml" value="dita2custom.xsl" type="file"/>
<feature extension="dita.conductor.target.relative" file="conductor.xml"/>
</plugin>
Code: Select all
<project name="com.company.custom.conductor">
<import file="build_dita2custom.xml"/>
</project>
Code: Select all
<project xmlns:dita="http://dita-ot.sourceforge.net" name="dita2custom">
<property name="dita2custom.plugin.path" value="${dita.dir}/plugins/com.company.custom/"/>
<target name="dita2custom.init" depends="copyfiles">
<property name="html-version" value="xhtml"/>
</target>
<target name="dita2custom"
depends="dita2custom.init,
build-init,
preprocess,
xhtml.topics,
dita.map.xhtml">
</target>
<target name="copyfiles">
<!-- copy files -->
<copy todir="${output.dir}">
<fileset dir="${dita2custom.plugin.path}${file.separator}resource"/>
</copy>
</target>
</project>
Thanks,
--Scott
Scott Hudson
Staff Content Engineer
Site: docs.servicenow.com
Staff Content Engineer
Site: docs.servicenow.com
-
- Posts: 9450
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Copy resource files to output.dir for custom xhtml
Hi Scott,
Maybe you could add some <echo>'s in the targets, see if they get called.
Also you seem to have defined a new transtype called custom.
Shouldn't you also have declared the transtype in your plugin.xml:
and then set the transtype="custom" parameter when publishing?
Basically how this works is that based on the transtype parameter value, the DITA OT main build file prepends dita2 to it and then calls the target, namely in your case dita2custom.
Regards,
Radu
Maybe you could add some <echo>'s in the targets, see if they get called.
Also you seem to have defined a new transtype called custom.
Shouldn't you also have declared the transtype in your plugin.xml:
Code: Select all
<feature extension="dita.conductor.transtype.check" value="custom" type="txt"/>
Basically how this works is that based on the transtype parameter value, the DITA OT main build file prepends dita2 to it and then calls the target, namely in your case dita2custom.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 156
- Joined: Sat Feb 26, 2005 12:09 am
- Location: USA
- Contact:
Re: Copy resource files to output.dir for custom xhtml
Post by shudson310 »
Thanks, Radu!
I modified slightly:
and build.xml:
It works now, though I will try to use parameters rather than hard-code the path...
I modified slightly:
Code: Select all
<plugin id="custom">
<require plugin="org.dita.html5"/>
<feature extension="package.version" value="1.0.0"/>
<feature extension="dita.conductor.transtype.check" value="custom"/>
<feature extension="dita.xsl.xhtml" value="custom.xsl" type="file"/>
<feature extension="dita.conductor.target.relative" file="conductor.xml"/>
<!-- extensions -->
<transtype name="custom" extends="common-html" desc="HTML5">
<param name="nav-toc" type="enum" desc="Specifies whether to generate a navigation TOC in topic pages.">
<val default="true" desc="No TOC">none</val>
<val desc="Partial TOC that shows the current topic">partial</val>
<val desc="Full TOC">full</val>
</param>
</transtype>
</plugin>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file is part of the DITA Open Toolkit project hosted on
Sourceforge.net. See the accompanying license.txt file for
applicable licenses.-->
<!-- (c) Copyright IBM Corp. 2006 All Rights Reserved. -->
<project xmlns:dita="http://dita-ot.sourceforge.net" name="custom" default="custom">
<property name="custom.plugin.path" value="${dita.dir}${file.separator}plugins${file.separator}com.jeppesen.slate${file.separator}"/>
<target name="custom.init">
<!--<property name="html-version" value="xhtml"/>-->
<property name="html-version" value="html5"/>
</target>
<!-- <target name="custom"
depends="custom.init,
build-init,
preprocess,
xhtml.topics,
dita.map.xhtml,
copyfiles">
</target>-->
<target name="custom"
depends="custom.init,
build-init,
preprocess,
dita2html5,
copyfiles">
</target>
<target name="copyfiles">
<!-- copy files -->
<!-- <copy todir="${dita.output.dir}">
<fileset dir="${custom.plugin.path}${file.separator}resource">
<include name="**/*" />
</fileset>
</copy>-->
<echo>Copying resource files...</echo>
<copy todir="c:\out\custom">
<fileset dir="${custom.plugin.path}${file.separator}resource">
<include name="**/*" />
</fileset>
</copy>
</target>
</project>
Scott Hudson
Staff Content Engineer
Site: docs.servicenow.com
Staff Content Engineer
Site: docs.servicenow.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service