本文整理了Java中org.apache.batik.xml.XMLUtilities.testXMLQName()
方法的一些代码示例,展示了XMLUtilities.testXMLQName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLUtilities.testXMLQName()
方法的具体详情如下:
包路径:org.apache.batik.xml.XMLUtilities
类名称:XMLUtilities
方法名:testXMLQName
[英]Test whether the given string is an XML 1.0 Name and/or QName.
[中]测试给定字符串是否为XML 1.0名称和/或QName。
代码示例来源:origin: org.apache.xmlgraphics/batik-dom
/**
* <b>DOM</b>: Implements {@link
* DOMImplementation#createDocumentType(String,String,String)}.
*/
public DocumentType createDocumentType(String qualifiedName,
String publicId,
String systemId) {
if (qualifiedName == null) {
qualifiedName = "";
}
int test = XMLUtilities.testXMLQName(qualifiedName);
if ((test & XMLUtilities.IS_XML_10_NAME) == 0) {
throw new DOMException
(DOMException.INVALID_CHARACTER_ERR,
formatMessage("xml.name",
new Object[] { qualifiedName }));
}
if ((test & XMLUtilities.IS_XML_10_QNAME) == 0) {
throw new DOMException
(DOMException.INVALID_CHARACTER_ERR,
formatMessage("invalid.qname",
new Object[] { qualifiedName }));
}
return new GenericDocumentType(qualifiedName, publicId, systemId);
}
}
代码示例来源:origin: fr.avianey.apache-xmlgraphics/batik
/**
* <b>DOM</b>: Implements {@link
* DOMImplementation#createDocumentType(String,String,String)}.
*/
public DocumentType createDocumentType(String qualifiedName,
String publicId,
String systemId) {
if (qualifiedName == null) {
qualifiedName = "";
}
int test = XMLUtilities.testXMLQName(qualifiedName);
if ((test & XMLUtilities.IS_XML_10_NAME) == 0) {
throw new DOMException
(DOMException.INVALID_CHARACTER_ERR,
formatMessage("xml.name",
new Object[] { qualifiedName }));
}
if ((test & XMLUtilities.IS_XML_10_QNAME) == 0) {
throw new DOMException
(DOMException.INVALID_CHARACTER_ERR,
formatMessage("invalid.qname",
new Object[] { qualifiedName }));
}
return new GenericDocumentType(qualifiedName, publicId, systemId);
}
}
代码示例来源:origin: org.apache.xmlgraphics/batik-dom
/**
* <b>DOM</b>: Implements DOMImplementation#createDocumentType(String,String,String).
*/
public DocumentType createDocumentType(String qualifiedName,
String publicId,
String systemId) {
if (qualifiedName == null) {
qualifiedName = "";
}
int test = XMLUtilities.testXMLQName(qualifiedName);
if ((test & XMLUtilities.IS_XML_10_NAME) == 0) {
throw new DOMException
(DOMException.INVALID_CHARACTER_ERR,
formatMessage("xml.name",
new Object[] { qualifiedName }));
}
if ((test & XMLUtilities.IS_XML_10_QNAME) == 0) {
throw new DOMException
(DOMException.INVALID_CHARACTER_ERR,
formatMessage("invalid.qname",
new Object[] { qualifiedName }));
}
return new GenericDocumentType(qualifiedName, publicId, systemId);
}
代码示例来源:origin: fr.avianey.apache-xmlgraphics/batik
/**
* <b>DOM</b>: Implements {@link
* DOMImplementation#createDocumentType(String,String,String)}.
*/
public DocumentType createDocumentType(String qualifiedName,
String publicId,
String systemId) {
if (qualifiedName == null) {
qualifiedName = "";
}
int test = XMLUtilities.testXMLQName(qualifiedName);
if ((test & XMLUtilities.IS_XML_10_NAME) == 0) {
throw new DOMException
(DOMException.INVALID_CHARACTER_ERR,
formatMessage("xml.name",
new Object[] { qualifiedName }));
}
if ((test & XMLUtilities.IS_XML_10_QNAME) == 0) {
throw new DOMException
(DOMException.INVALID_CHARACTER_ERR,
formatMessage("invalid.qname",
new Object[] { qualifiedName }));
}
return new GenericDocumentType(qualifiedName, publicId, systemId);
}
代码示例来源:origin: apache/batik
/**
* <b>DOM</b>: Implements {@link
* DOMImplementation#createDocumentType(String,String,String)}.
*/
public DocumentType createDocumentType(String qualifiedName,
String publicId,
String systemId) {
if (qualifiedName == null) {
qualifiedName = "";
}
int test = XMLUtilities.testXMLQName(qualifiedName);
if ((test & XMLUtilities.IS_XML_10_NAME) == 0) {
throw new DOMException
(DOMException.INVALID_CHARACTER_ERR,
formatMessage("xml.name",
new Object[] { qualifiedName }));
}
if ((test & XMLUtilities.IS_XML_10_QNAME) == 0) {
throw new DOMException
(DOMException.INVALID_CHARACTER_ERR,
formatMessage("invalid.qname",
new Object[] { qualifiedName }));
}
return new GenericDocumentType(qualifiedName, publicId, systemId);
}
}
代码示例来源:origin: apache/batik
/**
* <b>DOM</b>: Implements DOMImplementation#createDocumentType(String,String,String).
*/
public DocumentType createDocumentType(String qualifiedName,
String publicId,
String systemId) {
if (qualifiedName == null) {
qualifiedName = "";
}
int test = XMLUtilities.testXMLQName(qualifiedName);
if ((test & XMLUtilities.IS_XML_10_NAME) == 0) {
throw new DOMException
(DOMException.INVALID_CHARACTER_ERR,
formatMessage("xml.name",
new Object[] { qualifiedName }));
}
if ((test & XMLUtilities.IS_XML_10_QNAME) == 0) {
throw new DOMException
(DOMException.INVALID_CHARACTER_ERR,
formatMessage("invalid.qname",
new Object[] { qualifiedName }));
}
return new GenericDocumentType(qualifiedName, publicId, systemId);
}
内容来源于网络,如有侵权,请联系作者删除!