xsl:result-document filenames turn uppercase
Added by Anonymous over 14 years ago
Legacy ID: #8652041 Legacy Poster: Joachim (hrtrj)
Hello, I'm using xsl:result-document to generate HTML files from an XML source file. The parameter value for href contains both uppercase and lowercase characters. While most filenames are written to the output directory as intended, others (about one in three) has a filename in all uppercase, except the html extension. The same parameter value is printed correctly inside the file. Do you have any idea what might be wrong? I'm using Saxon-HE 9.2.0.6J on Windows XP SP3. Thanks in advance for any helpful comments. Joachim Here's a an excerpt of the stylesheet: [code] <xsl:param name="result-path">..\html\</xsl:param> <xsl:template name="file"> <xsl:param name="filename"/> <xsl:variable name="fullfilename"> <xsl:value-of select="$result-path"/><xsl:value-of select="$filename"/>xsl:text.html</xsl:text> </xsl:variable> <xsl:result-document href="{$fullfilename}" method="html">
<xsl:value-of select="$fullfilename"/>
<xsl:value-of select="$filename"/>
</xsl:result-document> </xsl:template> [/code]Replies (2)
RE: xsl:result-document filenames turn uppercase - Added by Anonymous over 14 years ago
Legacy ID: #8652116 Legacy Poster: Michael Kay (mhkay)
The only answer I can suggest is that the file already exists with its uppercase name. My experience is that if a file A.xml exists, and you try to overwrite it with a file called a.xml, the file will be successfully overwritten, but the old name will be retained.
RE: xsl:result-document filenames turn uppercase - Added by Anonymous over 14 years ago
Legacy ID: #8653235 Legacy Poster: Joachim (hrtrj)
Thanks a lot for your help, your guess was correct. Once I had deleted the old files with uppercase names, the problem did not appear again. Joachim
Please register to reply