验证 FO 文件 [英] Validate FO file

查看:24
本文介绍了验证 FO 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从给定的 xsl 文件和给定的 xml 文件生成了一个 FO 文件.我想使用 java 代码验证 FO 文件.从xml和xsl生成fo文件时,是否自动检查?

I generated a FO file from given xsl file and given xml file. I want to validate the FO file using a java code. When generating the fo file from xml and xsl, is it automatically checked?

推荐答案

我不这么认为.我得到的第一个迹象是 FO 有什么问题,FO 处理器在 PDF 生成过程中出现错误.Oxygen 的一位开发人员在 在 Oxygen 论坛上这样说:

I don't think so. The first indication I get that anyting's wrong with the FO is when the FO processor gives an error during PDF generation. One of the developers of Oxygen has this to say about the matter on the Oxygen forum:

XSL-FO 的问题在于没有工具可以完全正确地验证它.XML 模式无法指定 XSL-FO 输出文件中的所有约束,并且没有用于验证 XSL-FO 输出的官方 XML 模式.除此之外,一些 XSL-FO 处理器(如 RenderX XEP)对标准有自己的扩展.对我来说最好的验证是将 XSL-FO 处理为 PDF,从而让处理器在遇到警告和错误时发出警告和错误.

The problem with XSL-FO is that there is no tool which can fully and properly validate it. An XML Schema cannot specify all constraints which are in an XSL-FO output file and there is no official XML Schema for validating XSL-FO output. Besides this, some XSL-FO processors like RenderX XEP have their own extensions to the standard. The best validation for me is to process the XSL-FO to PDF and thus let the processor issue warnings and errors as they are encountered.

这篇关于验证 FO 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆