當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。