使用 schematron 验证二进制文件是否存在
我想使用 schematron 来验证测试文档中指定的文件是否确实存在。文档和文件将始终驻留在同一目录中。例如:
<foo icon="bar.png" />
与正在验证的文档位于同一目录中的名为“bar.png”的文件的存在应该通过。
到目前为止,我的研究让我相信这甚至是不可能的。
我正在使用 Saxon EE 9.3,尽管 oXygen XML 与 XSLT 2.0 一起使用。
Id like to use schematron to validate that a file specified in the test document is actually present. The document and file will always reside in the same directory. e.g.:
<foo icon="bar.png" />
The presence of a file named "bar.png" within the same directory as the document being validated should pass.
My research up to this point leads me to believe this may not even be possible.
I'm using Saxon EE 9.3 though oXygen XML with XSLT 2.0.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,您可以编写一个扩展函数,但是获取正在验证的文档的位置对我来说看起来严重超出了范围,当然它应该与位置无关。
执行 schematron 的进程可能无法访问该路径......
并且一旦您通过了验证,您就无法知道该文件已消失,对我来说,这看起来像是为了获得非常可疑的奖励而做的大量工作。
我们将 NMatrix 与 C# 一起使用,这有点死了。我说我们,一位最近离开的同事做了大部分工作,所以剩下的人已经使用了我们的隐形设备……
我想我会看一些简单的东西,并做一个额外的“验证”步骤。
Well you could write an extension function, but getting the location of the document being validated looks seriously out of scope to me, certainly it should be location agnostic.
The process doing the schematron might not have access to that path....
And once you've passed validation, there's no way you can know the file's been disappeared, looks like a lot of work for a very dubious reward to me.
We use NMatrix with C# which is sort of dead. I say we , a colleague who's recently left did most of the work, so those remaining have engaged our cloaking devices...
I think I'd be looking at something simple and doing it an extra 'validation' step.