本文整理匯總了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);
}
示例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);
}
示例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);
}
示例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");
}
示例5: getNamespaceURI
@Override
protected String getNamespaceURI() {
return XMLConstants.W3C_XML_SCHEMA_NS_URI;
}