I don't know of any way to get modxslt to do exactly what you want.
But I have some ideas.
> If I relied on hardcoding paths in the xslt, I couldn't
> use the same xslt as I do when using it from the
> command line, and if I attempted to view two of these
> documents at the same time, they'd overwrite each other's
> output.
Well, this might not be what you were thinking of, but you could use
variable hard coded paths like:
/tmp/{$makeItVary}/files
- or so that you don't have to mess with directories -
/tmp/{$makeItVary}-files
You could set an id for each file that would be fed through the xslt
style sheet and use this id in place of the makeItVary. If you don't
like that idea, then maybe use the time, etc, to vary names. The main
problem I see with using a time is that the files would have to be
cleaned up periodically.
It may also be possible to use the $HEADER variable to produce a
unique location as well. I would know how to do so in php, but since
php set the variables I would use and since is not easy to find all of
the variables stored in $HEADER, I don't know how well this would
work.
Yet another possibility is to pass an arg to the stylesheet from the
python script using GET. This may prove to be the best solution
because you only would have to touch two files, the python and the
stylesheet.
I personally do not like the idea of using absolute links either, but
since they do work, I wouldn't give up on them yet. If you do use
absolute links, you would probably want to set a tmpPath variable or
whatever like <xsl:variable name="tmpPath">/tmp</xsl:variable> so that
if you ever need to move the path it would prove decently simple.
Hope this helps even though using a relative href would be most ideal,
Eric Anderson