Skip to content

Access a map parameter during the XHTML processing #4438

Discussion options

You must be logged in to vote

I had a similar problem in the past. This was my way to get it working:

Set your local param like this:

<?xml version="1.0" encoding="UTF-8"?>
<extension>
  <param name="input.map.url" expression="${dita.temp.dir}${file.separator}${user.input.file}"/>
</extension>

In the XSLT you can refer to the file like this to load it:

<xsl:param name="input.map.url" as="xs:string?"/>
<xsl:variable name="escapedFilePath" select="replace($input.map.url, '\\', '/')"/>
<xsl:variable name="replaceSpaces" select="replace($escapedFilePath, ' ', '%20')"/>
<xsl:variable name="concatUri" select="concat('file:/', $replaceSpaces)"/>
<xsl:variable name="strippedUri" select="replace($concatUri, '//', '/')"/>
<xsl:v…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@gbebie-valerian-antidot
Comment options

Answer selected by gbebie-valerian-antidot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants