Using XSLT to output multiple files

后端 未结 2 709
耶瑟儿~
耶瑟儿~ 2021-01-25 14:31

I\'m trying to get an example that I found for using XSLT 2.0 to output multiple files working.

Using Saxon B 9.7.0.1 with Java 1.6, I get this error:

C:\\Docu         


        
相关标签:
2条回答
  • 2021-01-25 14:48

    I had the same issue with saxon -o: outputfile replacing the spaces with %20..

    found out the issue is saxon and java versions.

    Linux JAVA 1.7.0_45 : Saxon creates %20 Unix JAVA 1.5.0_61 : SAXON creates %20 Unix JAVA 1.4.2_22 : SAXON Does Not creates %20 directory

    0 讨论(0)
  • 2021-01-25 14:58

    Character 20 in your URI is the first space in "Documents and Settings". As a quick fix, try moving the files to a path without spaces. (Say, "C:\test" or some such.) I suspect the long-term fix is to change your XSLT to encode spaces to %20 before feeding $filename to xsl:result-document, but I'm afraid my XSLT-2.0-fu isn't strong enough to tell you how.

    Edit: I haven't tested this, as I don't have an XSLT 2.0 processor handy, but after glancing at the docs, it looks like you want the encode-for-uri function. Something like the following may work for you:

    <xsl:result-document href="{fn:encode-for-uri($filename)}" format="html">
    
    0 讨论(0)
提交回复
热议问题