0

我将 Altova XMLSpy 映射到 Apache FOP 以进行 XSL:FO 转换(Tools->Options->XSL->Selected fop.bat),然后我编写了一个简单的 HelloWorld 输出,如下所示,并尝试将 XSL:FO 转换为 PDF 输出,但是 XMLSpy 抛出了这个错误“无法创建临时文件!访问被拒绝”,有人能告诉我为什么会出现这个错误以及如何解决它吗?

        <?xml version="1.0" encoding="utf-8"?>
            <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

              <fo:layout-master-set>
                <fo:simple-page-master master-name="hello"
                page-height="11in"  page-width="8.5in" margin-top="1in" 
                margin-bottom="1in" margin-left="1in" margin-right="1in">
                  <fo:region-body margin-top="1in" margin-bottom=".5in"/>
                </fo:simple-page-master>
              </fo:layout-master-set>

              <fo:page-sequence master-reference="hello">
                <fo:flow flow-name="xsl-region-body">
                  <fo:block font-size="18pt" text-align="center" font-weight="bold">
                    Hello World!
                  </fo:block>
                </fo:flow>
              </fo:page-sequence>

            </fo:root>
4

2 回答 2

0

I copy/pasted some html into a new, unsaved Xmlspy html document. I then switched from Text view to Browser view. Xmlspy showed an error "temporary file could not be created", "access denied". When I ran procmon, it turns out that Xmlspy was trying to create the file as "C:\Program Files (x86)\Altova\XMLSpy2013\tmp0000.html". As I am running Windows 8, all of the files and directories under "C:\Program files (x86)" require elevated privileges to be created / updated / deleted.

It is an Xmlspy defect. They need to create their temp files in the correct location. I guess if you really needed it to work, you could run Xmlspy with elevated privileges. I don't need it that badly.

于 2013-10-16T22:49:51.590 回答
0

Altova 网站提到:

这是 IE 的问题。当您直接从电子邮件打开 XML 文件时,该文件将保存在临时文件夹中。XMLSpy® 2012 可以处理此问题并成功保存并因此显示 XML 文件。另一方面,IE 无法成功执行此操作并给出“拒绝访问”消息。首先保存文件将使 IE 能够正确显示它。

这可能是你的问题吗?它肯定与 Altova XMLSpy 有关,而不是与您的特定 XML 或 XSL 有关。

于 2012-04-02T06:46:01.137 回答