How can I grab build paramaters to use in my xsl?
Posted: Mon Mar 23, 2009 10:26 pm
I would like to make a "Back" or "Return to Previous Page" link in my HTML output with dita2xhtmlImpl.xsl and I don't want to hard code it to default to index.html so I thought of somehow using the args.xhtml.toc parameter that you can set on your build to somehow feed the filename into the XSL so that I can use it to make the href point to myfilename.html with "myfilename" parsed from args.xhtml.toc.
I noticed that build_dita2xhtml.xml has a build statement with that parameter here:
What is the best way to access this parameter? And also how could I write it to use the parameter to customize the 'href' which the link points to? Currently it looks like: <a href="../index.html">Back</a>. Can you directly interpolate a variable/parameter into an href="" statement, like <a href="../{$myparam-var}.html">Back</a>?
Thanks for any suggestions.
Josh
I noticed that build_dita2xhtml.xml has a build statement with that parameter here:
Code: Select all
<target name="dita.map.xhtml.init" description="">
<condition property="out.ext" value=".html">
<not>
<isset property="out.ext" />
</not>
</condition>
<condition property="args.xhtml.toc" value="index">
<not>
<isset property="args.xhtml.toc" />
</not>
</condition>
</target>
Thanks for any suggestions.
Josh