这些代码看起来是很熟悉,它与 清单 1 中的 SAX 解析几乎相同,尽管类名有所不同,许多选项是固定的。
This should look familiar; although the class names are a bit different and several options are set, this is not much different from the SAX parsing in Listing 1.
清单2展示了如何在运行时使用- cp选项来指定类路径,这里的运行时是指启动应用程序和jvm时。
Listing 2 shows how to use the -cp option to specify the class path at runtime, which is when the application is launched and the JVM is started.
与清单4类似,也可以指定- k命令行选项来强制脚本继续,即便在xsltproc处理过程中检测到错误也是如此。
As in Listing 4, you can also specify the -k command-line option to force the script to continue even if some errors have been detected during xsltproc processing.
应用推荐