Hello friendly list,
I am stuck on an issue that I could need some help with. I am trying to make part of an existing plugin configurable by providing arguments/parameters to it that can be set on the dita-ot command line or in project files.
There are several places where parameters can be defined, and I am utterly confused about how they interact, and from where to where these parameters can then be passed. I believe I implemented everything as per the dita-ot documentation, but right now, no matter what I do, the parameters never seems to get to the transform – whether that is a default I set in plugin.xml, or an expression in params.xml, a command line parameter or a project file. Something however *does* get to the transform, but I don’t understand where that is coming from.
Before I go further, I also should say that I am fairly shaky about the dita-ot concepts of extension points, integration etc. so my language below may not be quite correct.
Here is what I have. A plugin com.dolby.word-etsi (“new plugin”) that extends on another plugin, com.elovirta.ooxml (“base plugin”). The new plugin inserts parameters into an extension point com.elovirta.ooxml.param defined in the base plugin. That extension point on the base plugin is in an xslt step calling “document.xsl”. The base document.xsl, also gets overridden in the new plugin with a new document.xsl (which ends up importing the base document.xsl).
In the new plugin, I define an additional parameter ooxml.live-links. I am expecting this parameter to show up as xsl:param inside the new document.xsl.
What happens instead is that something seems to pass in a parameter. I (think) I know this because I have made the parameter in the new document.xsl mandatory:
<xsl:param
name="ooxml.live-links"
select="true()"
as="xs:boolean"/>
… and am not getting an error. Also, the overridden parameter seems to be false() or false – I am printing it out.
Thanks for any and all insight you can provide on this.
Code:
<plugin
id="com.dolby.word-etsi">
<require
plugin="com.elovirta.ooxml"/>
<extension-point
id="depend.word-etsi.merge.post"
name="Target
after merge process"/>
<transtype
name="word-etsi"
desc="ETSI
Word">
<param
name="debug"
desc="Debug
processing" type="enum">
<val>true</val>
<val
default="true">false</val>
</param>
<!—inserted this one -->
<param
name="ooxml.live-links"
desc="make
links live links" type="enum">
<val>true</val>
<val
default="true">false</val>
</param>
</transtype>
[…]
<feature
extension="com.elovirta.ooxml.param"
file="params.xml"/>
[…]
ooxml.live-links is the new parameter that I would like to use in XSLT.
<params>
<param
name="debug"
expression="${debug}"
type="BOOLEAN"/>
<param
name="user.input.dir.uri"
expression="${user.input.dir.uri}"/>
<param
name="ooxml.live-links"
expression="${ooxml.live-links}"
type="BOOLEAN"/>
</params>
[…]
<property
name="document.xsl"
location="${docx.dir}/word/document.xsl"/>
<xslt
style="${document.xsl}"
in="${clean.input.file}"
out="${dita.temp.dir}/docx/word/document.xml"
force="true">
<dita:extension
id="com.elovirta.ooxml.param"
behavior="org.dita.dost.platform.InsertAction"/>
<param
name="image.dir"
expression="${image.dir}"/>
<!--param name="indent-base" expression="${indent-base}"/-->
<param
name="template.dir"
expression="${dotx.dir.uri}"/>
<param
name="input.dir.url"
expression="${user.input.dir.url}"/>
<xmlcatalog
refid="dita.catalog"/>
</xslt>
[…]
com.dolby.word-etsi/…/document.xsl :
<xsl:param
name="ooxml.live-links"
select="true()"
as="xs:boolean"/>
<xsl:param
name="ooxml.live-links.topic"
select="$ooxml.live-links"
as="xs:boolean?"/>
<xsl:param
name="ooxml.live-links.fig"
select="$ooxml.live-links"
as="xs:boolean?"/>
<xsl:param
name="ooxml.live-links.fn"
select="$ooxml.live-links"
as="xs:boolean?"/>
<xsl:param
name="ooxml.live-links.table"
select="$ooxml.live-links"
as="xs:boolean?"/>
<xsl:param
name="ooxml.live-links.bib"
select="$ooxml.live-links"
as="xs:boolean?"/>
<xsl:param
name="ooxml.live-links.li"
select="$ooxml.live-links"
as="xs:boolean?"/>
<xsl:import
href="plugin:com.elovirta.ooxml:docx/word/document.xsl"/>
Just checking whether this email went out to the list.
--
You received this message because you are subscribed to the Google Groups "DITA-OT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dita-ot-user...@googlegroups.com.
To view this discussion on the web, visit
https://groups.google.com/d/msgid/dita-ot-users/CO6PR06MB7329562AB57227B571A616D2AFC19%40CO6PR06MB7329.namprd06.prod.outlook.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/dita-ot-users/CO6PR06MB73292E200A487AB5C6807F8BAFC59%40CO6PR06MB7329.namprd06.prod.outlook.com.
Hi Radu,
Thanks very much for your suggestions. This helped, I got parameters to work as expected. I had a number of hickups, listing them here for the benefit of others that might try the same thing.
Again, thanks a bunch!
Regards,