I am a trying to pass the value of a shell variable to an xsltproc instance. The file text.xsl contains:
<xsl:stylesheet xmlns:xsl=”http://www.w3.org/1999/XSL/Transform” version=”1.0″>
<xsl:import href=”file:/Users/robertramey/WorkingProjects/modular-boost/tools/boostbook/xsl/docbook.xsl”/>
<xsl:import href=”file:$BOOST_ROOT/tools/boostbook/xsl/docbook.xsl”/>
</xsl:stylesheet>
#functions as expected
$echo $BOOST_ROOT
/Users/robertramey/WorkingProjects/modular-boost
#passes on first import as expected.
#but fails on the second as expect as BOOST_ROOT is not set
$xsltproc –maxdepth 6000 –xinclude –nonet test.xsl
warning: failed to load external entity
“file:$BOOST_ROOT/tools/boostbook/xsl/docbook.xsl”
#passes on the first import as expected
#fails on the second – NOT expected
$xsltproc –maxdepth 6000 –stringparam BOOST_ROOT “/Users/robertramey/WorkingProjects/modular-boost” –xinclude –nonet test.xsl
warning: failed to load external entity
“file:$BOOST_ROOT/tools/boostbook/xsl/docbook.xsl”
compilation error: file test.xsl line 4 element import
xsl:import : unable to load file:$BOOST_ROOT/tools/boostbook/xsl/docbook.xsl
Why is this? What do I have to do to make this work?