0

我必须运行一个 XSLT 2.0 样式表saxonb-xslt(它会警告 1.0 样式表)和一个 XSLT 1.0 样式表saxon-xslt(它不适用于 2.0 样式表)。有没有办法告诉撒克逊人:“这是一个样式表,自己想办法处理它。”?

我想让我的 Makefile 尽可能简单并且尽可能无警告。

4

1 回答 1

0

Not sure why this question hasn't been answered; you might find it more effective to ask Saxon-specific questions on the Saxon help list (accessible via the project on Sourceforge).

Generally these days I advise people to use a recent Saxon release (9.4) even for processing XSLT 1.0 code, in preference to using the old Saxon 6.5 processor. Yes, it produces a warning - unfortunately the XSLT 2.0 spec requires the warning - but you have to be doing something pretty strange to hit any compatibility problems. If you don't like the warning you can suppress it using -versionmsg:off.

But if you do want to select a different XSLT processor based on the version attribute in the stylesheet, you'll just have to code that logic into your script. This is easy enough if your script is written in an XML-oriented language such as XProc or xmlsh, it's a bit more tricky if you are using a general-purpose shell script.

于 2012-05-13T18:35:32.837 回答