net.sf.saxon.Query.setPermittedOptions()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(95)

本文整理了Java中net.sf.saxon.Query.setPermittedOptions方法的一些代码示例,展示了Query.setPermittedOptions的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setPermittedOptions方法的具体详情如下:
包路径:net.sf.saxon.Query
类名称:Query
方法名:setPermittedOptions

Query.setPermittedOptions介绍

[英]Set the options that are recognized on the command line. This method can be overridden in a subclass to define additional command line options.
[中]设置命令行上可识别的选项。可以在子类中重写此方法以定义其他命令行选项。

代码示例

代码示例来源:origin: net.sf.saxon/Saxon-HE

/**
 * Report incorrect usage of the command line, with a list of the options and arguments that are available
 *
 * @param message The error message
 */
protected void badUsage(String message) {
  if (!"".equals(message)) {
    System.err.println(message);
  }
  if (!showTime) {
    System.err.println(config.getProductTitle());
  }
  System.err.println("Usage: see http://www.saxonica.com/documentation/index.html#!using-xquery/commandline");
  System.err.println("Format: " + getClass().getName() + " options params");
  CommandLineOptions options = new CommandLineOptions();
  setPermittedOptions(options);
  System.err.println("Options available:" + options.displayPermittedOptions());
  System.err.println("Use -XYZ:? for details of option XYZ");
  System.err.println("Params: ");
  System.err.println("  param=value           Set query string parameter");
  System.err.println("  +param=filename       Set query document parameter");
  System.err.println("  ?param=expression     Set query parameter using XPath");
  System.err.println("  !param=value          Set serialization parameter");
  if (allowExit) {
    System.exit("".equals(message) ? 0 : 2);
  } else {
    throw new RuntimeException(message);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

System.err.println("Format: " + getClass().getName() + " options params");
CommandLineOptions options = new CommandLineOptions();
setPermittedOptions(options);
System.err.println("Options available:" + options.displayPermittedOptions());
System.err.println("Use -XYZ:? for details of option XYZ");

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

setPermittedOptions(options);
try {
  options.setActualOptions(args);

代码示例来源:origin: net.sf.saxon/Saxon-HE

setPermittedOptions(options);
try {
  options.setActualOptions(args);

相关文章