当前位置: 首页>>代码示例>>Java>>正文


Java XMLConstants.W3C_XML_SCHEMA_NS_URI属性代码示例

本文整理汇总了Java中javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI属性的典型用法代码示例。如果您正苦于以下问题:Java XMLConstants.W3C_XML_SCHEMA_NS_URI属性的具体用法?Java XMLConstants.W3C_XML_SCHEMA_NS_URI怎么用?Java XMLConstants.W3C_XML_SCHEMA_NS_URI使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在javax.xml.XMLConstants的用法示例。


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

示例1: buildElementMapCacheType

/**
 * Build element map adding to existing <code>elementMap</code>.
 * 
 * @param elementMap to add elements to.
 * @param inputSource to parse elements from.
 * @throws SAXException
 * @throws IOException
 * @throws ParserConfigurationException
 * @throws XPathExpressionException
 * @since GemFire 8.1
 */
private static final void buildElementMapCacheType(
    final LinkedHashMap<String, CacheElement> elementMap, final InputSource inputSource)
    throws SAXException, IOException, ParserConfigurationException, XPathExpressionException {
  final Document doc = XmlUtils.getDocumentBuilder().parse(inputSource);

  int rank = 0;

  final XPathContext xPathContext =
      new XPathContext(XSD_PREFIX, XMLConstants.W3C_XML_SCHEMA_NS_URI);
  final Node cacheType = XmlUtils.querySingleElement(doc, CACHE_TYPE_EMBEDDED, xPathContext);

  rank = buildElementMapXPath(elementMap, doc, cacheType, rank, XSD_COMPLEX_TYPE_CHILDREN,
      xPathContext);
}
 
开发者ID:ampool,项目名称:monarch,代码行数:25,代码来源:CacheElement.java

示例2: testCacheDefinedAsNestedComplexType8_1

/**
 * Asserts that Cache type is defined as a embedded ComplexType under an Element named "cache" for
 * version 8.1.
 * 
 * @since GemFire 8.1
 */
@Test
public void testCacheDefinedAsNestedComplexType8_1() throws Exception {
  Document doc = loadSchema(CacheXmlVersion.GEMFIRE_8_1.getSchemaLocation());
  final XPathContext xPathContext =
      new XPathContext(CacheElement.XSD_PREFIX, XMLConstants.W3C_XML_SCHEMA_NS_URI);
  final Node cacheType = XmlUtils.querySingleElement(doc.getFirstChild(),
      CacheElement.CACHE_TYPE_EMBEDDED, xPathContext);
  assertNotNull("Cache type is not embedded complexType.", cacheType);
}
 
开发者ID:ampool,项目名称:monarch,代码行数:15,代码来源:CacheElementJUnitTest.java

示例3: testCacheDefinedAsNestedComplexTypeLatest

/**
 * Asserts that Cache type is defined as an embedded ComplexType under an Element named "cache"
 * latest version. If this assertion fails it likely means that cache type is defined as a named
 * ComplexType or reference. Update code in CacheElement.buildElementMapCacheType to account for
 * this.
 * 
 * @since GemFire 8.1
 */
@Test
public void testCacheDefinedAsNestedComplexTypeLatest() throws Exception {
  Document doc = loadSchema(CacheXml.LATEST_SCHEMA_LOCATION);
  final XPathContext xPathContext =
      new XPathContext(CacheElement.XSD_PREFIX, XMLConstants.W3C_XML_SCHEMA_NS_URI);
  final Node cacheType = XmlUtils.querySingleElement(doc.getFirstChild(),
      CacheElement.CACHE_TYPE_EMBEDDED, xPathContext);
  assertNotNull("Cache type is not embedded complexType.", cacheType);
}
 
开发者ID:ampool,项目名称:monarch,代码行数:17,代码来源:CacheElementJUnitTest.java

示例4: RootSimpleTypeDefinitionTest

public RootSimpleTypeDefinitionTest(String name) {
    super(name);
    // This is a roundabout way of making sure that we're not using an
    // interned string (so that == doesn't work)
    String ns = "x" + XMLConstants.W3C_XML_SCHEMA_NS_URI;
    ns = ns.substring(1);
    typeString = new QName(ns, "string", "xsd");
    typeNonNegInt = new QName(ns, "nonNegativeInteger", "xsd");
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:RootSimpleTypeDefinitionTest.java

示例5: getNamespaceURI

@Override
protected String getNamespaceURI() {
    return XMLConstants.W3C_XML_SCHEMA_NS_URI;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:SchemaComponentImpl.java


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