XSLT-available Parameter for current directory in refactoring tool

Post here questions and problems related to oXygen frameworks/document types.
jeff_hooker
Posts: 12
Joined: Tue Jun 11, 2019 9:01 pm

XSLT-available Parameter for current directory in refactoring tool

Post by jeff_hooker » Thu May 14, 2020 1:03 am

Hi folks,

I'm using the refactoring tool to process huge multi-level directory structure of XML. I'd like to use the result-document xslt process to create a number of sub-files from each existing file and dump the new files into the same directory as the file currently being processed. Is there a built-in parameter for url of the current file already existing within the refactoring tool that I could use to populate the href parameter of the result-document process? Barring that, do you have any recommendations for achieving this?

Thanks,
Jeff.

Radu
Posts: 7032
Joined: Fri Jul 09, 2004 5:18 pm

Re: XSLT-available Parameter for current directory in refactoring tool

Post by Radu » Thu May 14, 2020 6:52 am

Hi Jeff,

There is no such special parameter being passed to the XSLT stylesheet but you can use the base-uri() XSLT function to access the location of the current converted XML document.
For example we have our own refactoring operations which extract from a DITA topic the inner topics as separate files, in this XSLT stylesheet:
OXYGEN_INSTALL_DIR/frameworks/dita/refactoring/convert-nested-topics-to-new-topic.xsl there is a call to this function:

Code: Select all

  <xsl:variable name="proposalName" select="f:generateOutputFileName(., base-uri())"/>
and the generateOutputFileName function is defined in the stylesheet OXYGEN_INSTALL_DIR/frameworks/dita/refactoring/utils/xslt-convert-inner-elements-to-topics.xsl where it uses the XSLT resolve-uri() function to compute the location of the file to write.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply