Some of our XML documents contain "included" subdocuments.
I have a pre-processor stylesheet which replaces every
<include href="relative-path-to-doc" />
with
<included href="relative-path-to-doc">
..content from included document..
</included>
Framemaker runs this correctly when loading the outer document and all the subcontent is included. The stylesheet calls
<xsl:apply-templates select="document(@href)/*"/>
to do this and the relative-path-to-doc is evaluated relative to the outer document which was passed to the pre-processor.
The problem I am having is when the full document is saved. There is a complementary post-processor stylesheet which is supposed to identify any
<included href="relative-path-to-doc">...content...</included>,
replace the included element with the include element in the output document, and process all the included content within
<xsl:result-document href="relative-path-to-doc"><xsl:apply-templates ... /></xsl:result-document>
When I run this stylesheet outside of Framemaker it correctly creates the result-document relative to the primary document, regardless of where I call the stylesheet from. Document() and xsl:result-document() are correctly complementary. But within Framemaker it fails with the error
Fatal Error at file C:\Program Files (x86)\Adobe\Adobe FrameMaker 2017\structure\xml\helpcenter\app\post.xsl, line 40, char -1, Message: java.io.FileNotFoundException: Access to the path 'C:\Program Files (x86)\Adobe\Adobe FrameMaker 2017\formats_sub.xml' is denied.
Is this a bug? How could I achieve what I am trying to do here?
Thanks
T