本文整理汇总了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;
}