• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java FeatureKeys类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.sf.saxon.lib.FeatureKeys的典型用法代码示例。如果您正苦于以下问题:Java FeatureKeys类的具体用法?Java FeatureKeys怎么用?Java FeatureKeys使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FeatureKeys类属于net.sf.saxon.lib包,在下文中一共展示了FeatureKeys类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: GauloisPipe

import net.sf.saxon.lib.FeatureKeys; //导入依赖的package包/类
/**
 * Constructs a new GauloisPipe.
 * This constructor is the main one, the other one is only for backward compatibility.
 * @param configurationFactory The configuration factory to use
 * @throws fr.efl.chaine.xslt.InvalidSyntaxException
 */
@SuppressWarnings("OverridableMethodCallInConstructor")
public GauloisPipe(final SaxonConfigurationFactory configurationFactory) throws InvalidSyntaxException {
    super();
    if(!protocolInstalled) {
        ProtocolInstaller.registerAdditionalProtocols();
        protocolInstalled = true;
    }
    this.configurationFactory = configurationFactory;
    Configuration saxonConfig=configurationFactory.getConfiguration();
    saxonConfig.setURIResolver(getUriResolver());
    // issue #30
    if(getEntityResolver() != null) {
        saxonConfig.setConfigurationProperty(FeatureKeys.ENTITY_RESOLVER_CLASS, getEntityResolver().getClass().getName());
    }
    xslCache = new HashMap<>();
    try {
        datatypeFactory = DatatypeFactory.getInstance(saxonConfig);
        xmlDatatypeFactory = javax.xml.datatype.DatatypeFactory.newInstance();
    } catch(ValidationException | DatatypeConfigurationException ex) {
        throw new InvalidSyntaxException(ex);
    }
}
 
开发者ID:cmarchand,项目名称:gaulois-pipe,代码行数:29,代码来源:GauloisPipe.java


示例2: createConfiguration

import net.sf.saxon.lib.FeatureKeys; //导入依赖的package包/类
private Configuration createConfiguration() throws IOException {
  File licenseFile = new File(Context.getInstance().getHomeDir(), "config/saxon-license.lic");
  String className = "net.sf.saxon.Configuration";
  String edition = "HE";
  if (licenseFile.isFile()) {
    Properties props = XSLWebUtils.readProperties(licenseFile);
    edition = props.getProperty("Edition", edition);
    if (edition.equals("PE")) {
      className = "com.saxonica.config.ProfessionalConfiguration";
    } else if (edition.equals("EE")) {
      className = "com.saxonica.config.EnterpriseConfiguration";
    }
    logger.info("Creating Saxon " + edition + " configuration ...");
    this.config = Configuration.makeLicensedConfiguration(this.getClass().getClassLoader(), className);
    config.setConfigurationProperty(FeatureKeys.LICENSE_FILE_LOCATION, licenseFile.getAbsolutePath());
  } else {
    logger.info("Creating Saxon " + edition + " configuration ...");
    this.config = new Configuration();
  }
  return config;
}
 
开发者ID:Armatiek,项目名称:xslweb,代码行数:22,代码来源:XSLWebConfiguration.java


示例3: createTransformerFactory

import net.sf.saxon.lib.FeatureKeys; //导入依赖的package包/类
public static TransformerFactory createTransformerFactory() {
  final TransformerFactoryImpl factory = new TransformerFactoryImpl();
  factory.setAttribute(FeatureKeys.TRACE_LISTENER, new Saxon9TraceListener());
  try {
    factory.setAttribute(FeatureKeys.OPTIMIZATION_LEVEL, "0");
  } catch (IllegalArgumentException e) {
    e.printStackTrace();
  }
  return factory;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:Saxon9Support.java


示例4: initTransformerFactory

import net.sf.saxon.lib.FeatureKeys; //导入依赖的package包/类
public void initTransformerFactory(TransformerFactory factory) {
  try {
    factory.setAttribute(FeatureKeys.XSLT_VERSION, "2.0");
  } catch (IllegalArgumentException e) {
    // The old Saxon 9 (pre HE/PE/EE) throws this exception.
  }
  factory.setAttribute(FeatureKeys.LINE_NUMBERING, Boolean.TRUE);
  factory.setAttribute(FeatureKeys.VERSION_WARNING, Boolean.FALSE);
}
 
开发者ID:relaxng,项目名称:jing-trang,代码行数:10,代码来源:NewSaxonSchemaReaderFactory.java


示例5: doAdditionalConfiguration

import net.sf.saxon.lib.FeatureKeys; //导入依赖的package包/类
@Override
protected void doAdditionalConfiguration(Processor processor) {
    Configuration configuration = processor.getUnderlyingConfiguration();
    configuration.setBooleanProperty(FeatureKeys.EAGER_EVALUATION, true);
    StaticQueryContext context = configuration.getDefaultStaticQueryContext();
    configuration.setTraceListener(new SaxonTraceListener(this));
    context.setCodeInjector(new SaxonExtendedTraceCodeInjector());
    Optimizer optimizer = configuration.obtainOptimizer();
    optimizer.setOptimizationLevel(Optimizer.NO_OPTIMIZATION);
}
 
开发者ID:ligasgr,项目名称:intellij-xquery,代码行数:11,代码来源:SaxonDebuggerApp.java


示例6: setXsltVersion

import net.sf.saxon.lib.FeatureKeys; //导入依赖的package包/类
public void setXsltVersion(String xsltVersion) {
    this.setConfigurationProperty(FeatureKeys.XSLT_VERSION, xsltVersion);
}
 
开发者ID:esacinc,项目名称:sdcct,代码行数:4,代码来源:SdcctSaxonConfiguration.java


示例7: createTransformerFactorySaxonFirst

import net.sf.saxon.lib.FeatureKeys; //导入依赖的package包/类
/**
 * Create a new {@link TransformerFactory} trying to invoke the Saxon
 * implementation first using the class
 * {@value #SAXON_TRANSFORMER_FACTORY_CLASS}.
 *
 * @param aClassLoader
 *        The optional class loader to be used. May be <code>null</code>.
 * @param aErrorListener
 *        An optional XSLT error listener to be used. May be
 *        <code>null</code>.
 * @param aURIResolver
 *        An optional XSLT URI resolver to be used. May be <code>null</code>.
 * @return A new {@link TransformerFactory} and not <code>null</code>.
 * @throws InitializationException
 *         In case initialization fails.
 */
@Nonnull
public static TransformerFactory createTransformerFactorySaxonFirst (@Nullable final ClassLoader aClassLoader,
                                                                     @Nullable final ErrorListener aErrorListener,
                                                                     @Nullable final URIResolver aURIResolver)
{
  TransformerFactory aFactory;
  try
  {
    // Try Saxon first
    final ClassLoader aEffectiveClassLoader = aClassLoader != null ? aClassLoader
                                                                   : ClassLoaderHelper.getContextClassLoader ();
    aFactory = TransformerFactory.newInstance (SAXON_TRANSFORMER_FACTORY_CLASS, aEffectiveClassLoader);

    // Debug/testing only
    if (false)
      aFactory.setFeature (FeatureKeys.TRACE_OPTIMIZER_DECISIONS, true);
    if (false)
      aFactory.setFeature (FeatureKeys.COMPILE_WITH_TRACING, true);
    if (false)
      aFactory.setAttribute (FeatureKeys.XSLT_VERSION, "2.0");
  }
  catch (final TransformerFactoryConfigurationError | TransformerConfigurationException ex)
  {
    try
    {
      // Try default afterwards
      aFactory = TransformerFactory.newInstance ();
    }
    catch (final TransformerFactoryConfigurationError ex2)
    {
      throw new InitializationException ("Failed to create XML TransformerFactory", ex2);
    }
  }

  if (aErrorListener != null)
    aFactory.setErrorListener (aErrorListener);
  if (aURIResolver != null)
    aFactory.setURIResolver (aURIResolver);
  return aFactory;
}
 
开发者ID:phax,项目名称:ph-schematron,代码行数:57,代码来源:SchematronTransformerFactory.java


示例8: newTransformerFactory

import net.sf.saxon.lib.FeatureKeys; //导入依赖的package包/类
/**
 * Creates and configures an instance of the default TransformerFactory
 * implementation.
 */
public static TransformerFactory newTransformerFactory() {

	TransformerFactory factory = new net.sf.saxon.TransformerFactoryImpl();

	factory.setAttribute(FeatureKeys.XINCLUDE, PrimedTransformer.SET_XINCLUDE_AWARE);
	factory.setAttribute(FeatureKeys.VALIDATION_WARNINGS, !PrimedTransformer.SET_VALIDATING);

	return factory;

}
 
开发者ID:martian-a,项目名称:willow,代码行数:15,代码来源:PrimedTransformer.java



注:本文中的net.sf.saxon.lib.FeatureKeys类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java OneBlockInfo类代码示例发布时间:2022-05-22
下一篇:
Java SnmpMsgTranslator类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap