gpt4 book ai didi

org.apache.xerces.util.XMLCatalogResolver.resolveURI()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 14:42:40 26 4
gpt4 key购买 nike

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

XMLCatalogResolver.resolveURI介绍

[英]Returns the URI mapping in the catalog for the given URI reference or null if no mapping exists. URI comparison is case sensitive. If the URI reference is an URN in the publicid namespace it is converted into a public identifier by URN "unwrapping" as specified in the XML Catalogs specification and then resolution is performed following the semantics of external identifier resolution.
[中]返回给定URI引用的目录中的URI映射,如果不存在映射,则返回null。URI比较区分大小写。如果URI引用是publicid命名空间中的一个URN,则按照XML Catalogs规范中的规定,通过URN“unwrapping”将其转换为公共标识符,然后按照外部标识符解析的语义执行解析。

代码示例

代码示例来源:origin: org.opengis.cite/schema-utils

/**
 * Looks up a (schema) URI in an entity catalog by system identifier or
 * namespace name.
 * 
 * @param uri
 *            An absolute URI referring to an XML Schema resource.
 * 
 * @return A String denoting the location of a local copy, or null if no
 *         matching entry exists.
 */
String lookupSchemaByURI(URI uri) {
  String schemaRef = null;
  try {
    schemaRef = resolver.resolveSystem(uri.toString());
    if (null == schemaRef) {
      schemaRef = resolver.resolveURI(uri.toString());
    }
  } catch (IOException e) {
    LOGR.log(Level.WARNING, "Error reading schema catalog. {0}",
        e.getCause());
  }
  return schemaRef;
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

resolvedId = resolveURI(namespace);

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

resolvedId = resolveURI(namespaceURI);

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com