Reputation: 2125
I'm calling Saxon (9.6 HE) from a batch file:
Transform -t -s:"in.xml" -xsl:"ChangeFileName.xsl" -o:"changefilename.txt" 1>>convert.log 2>&1
The command 1>>convert.log 2>&1
sends Saxon's standard error output to the file convert.log
.
Transform calls an XSLT that outputs 2 text files:
<xsl:template match="manual">
<xsl:result-document method="text" href="version.txt">
<xsl:text> </xsl:text><xsl:value-of select="/manual/bookVariables/Variable[@Name='USR_Manual_Version']/@Value"/><xsl:text> </xsl:text>
</xsl:result-document>
<xsl:result-document method="text" href="state.txt">
<xsl:text> </xsl:text><xsl:value-of select="/manual/bookVariables/Variable[@Name='USR_Manual_State']/@Value"/>
</xsl:result-document>
</xsl:template>
This works when I run the transformation from my own user account, but fails when I use a different account: the text files state.txt
and version.txt
are not created.
I'm trying to troubleshoot this, but Saxon does not output any error message. My log file just contains
Writing to file:/Z:/version.txt
with no indication that the write has failed or why it's failed.
Worse, when I run the Transform command directly from a command line window, it succeeds.
How can I get more detailed error information out of Saxon?
Upvotes: 0
Views: 325
Reputation: 163595
Tricky. It's unlikely you'll get any more information out of Saxon, because Saxon probably isn't aware that the files haven't been successfully written. Usually with problems like this, the files actually exist, but they aren't where you expect them.
One suggestion: try running with the -T option. The resulting trace should tell you whether the transformation ran to (apparently successful) completion, or whether it broke off prematurely at some stage.
Another suggestion: experiment with using absolute URIs (e.g. file:///x/y/z.txt) in the href attribute.
I've forgotten most of what I once knew about Windows file systems, but is there any possibility that under the account that fails, drive letter Z is mapped to somewhere unexpected?
Upvotes: 1