[Gestalt-users] Should file: URIs create new directories?
Status: Alpha
Brought to you by:
colin-adams
From: Colin P. A. <co...@co...> - 2008-03-02 07:05:21
|
Currently, if you specify a file: URI in the href attribute of xsl:result-document, Gestalt will not attempt to create any directories for you. This is consistent with the behaviour I would expect if you specify an http URI (I would not expect a server to create new directories for you). It is also consistent with i/o redirection (if you DON'T use xsl:result-document, and attempt to redirect the output to a file in a non-existing directory, bash refuses to do it. Liam Quinn points out that this is not what Saxon does (nor xsltproc + exslt - both behaviours are consistent with the specifications). Furthermore, with xsl:result-document, the actual href attribute, and therefore the presence or absence of necessary directories, can be determined (and he does so) by data in the source documents. And XSLT does not have a mkdir command. I pointed out that it would be possible to tackle this by doing two transformations - the first of which creates the necessary mkdir commands. But this would not be efficient (two passes over the source document), and further more, it would not be portable accross operating systems. An alternative would be for an extension function that takes a file: URI and attempts to create all necessary directories. Opinions are welcome. -- Colin Adams Preston Lancashire |