xsl:result-document filenames turn uppercase

Help
Anonymous
2010-09-22
2012-10-08
  • Anonymous - 2010-09-22

    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:

    <!-- Relative path for output -->
    <xsl:param name="result-path">..\\html\\</xsl:param>
    
    <!-- Here is the template -->
    <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">
            <html>
                <head>
                </head>
                <body>
                    <p><xsl:value-of select="$fullfilename"/></p>
                    <p><xsl:value-of select="$filename"/></p>
                </body>
            </html>
        </xsl:result-document>
    </xsl:template>
    
     
  • Michael Kay

    Michael Kay - 2010-09-22

    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.

     
  • Anonymous - 2010-09-23

    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

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks