- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.modeshape.common.xml.XmlCharacters.isValidNcName()
方法的一些代码示例,展示了XmlCharacters.isValidNcName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlCharacters.isValidNcName()
方法的具体详情如下:
包路径:org.modeshape.common.xml.XmlCharacters
类名称:XmlCharacters
方法名:isValidNcName
[英]Determine whether the supplied character is a valid non-first character in an XML NCName. The #isValidNcNameStart(int) in an XML NCName is more restrictive than the remaining characters.
[中]确定提供的字符是否为XML名称中的有效非第一个字符。XML NCName中的#isValidNcNameStart(int)比其余字符更具限制性。
代码示例来源:origin: ModeShape/modeshape
@Override
public boolean isNextValidXmlNcNameCharacter() {
int nextIndex = lastIndex + 1;
return nextIndex <= maxIndex && XmlCharacters.isValidNcName(content[nextIndex]);
}
}
代码示例来源:origin: ModeShape/modeshape
/**
* Determine if the supplied name is a valid XML NCName.
*
* @param name the string being checked
* @return true if the supplied name is indeed a valid XML NCName, or false otherwise
*/
public static boolean isValidNcName( String name ) {
if (name == null || name.length() == 0) return false;
CharacterIterator iter = new StringCharacterIterator(name);
char c = iter.first();
if (!isValidNcNameStart(c)) return false;
while (c != CharacterIterator.DONE) {
if (!isValidNcName(c)) return false;
c = iter.next();
}
return true;
}
}
代码示例来源:origin: org.fcrepo/modeshape-common
/**
* Determine if the supplied name is a valid XML NCName.
*
* @param name the string being checked
* @return true if the supplied name is indeed a valid XML NCName, or false otherwise
*/
public static boolean isValidNcName( String name ) {
if (name == null || name.length() == 0) return false;
CharacterIterator iter = new StringCharacterIterator(name);
char c = iter.first();
if (!isValidNcNameStart(c)) return false;
while (c != CharacterIterator.DONE) {
if (!isValidNcName(c)) return false;
c = iter.next();
}
return true;
}
}
代码示例来源:origin: org.fcrepo/modeshape-common
@Override
public boolean isNextValidXmlNcNameCharacter() {
int nextIndex = lastIndex + 1;
return nextIndex <= maxIndex && XmlCharacters.isValidNcName(content[nextIndex]);
}
}
代码示例来源:origin: org.modeshape/modeshape-common
/**
* Determine if the supplied name is a valid XML NCName.
*
* @param name the string being checked
* @return true if the supplied name is indeed a valid XML NCName, or false otherwise
*/
public static boolean isValidNcName( String name ) {
if (name == null || name.length() == 0) return false;
CharacterIterator iter = new StringCharacterIterator(name);
char c = iter.first();
if (!isValidNcNameStart(c)) return false;
while (c != CharacterIterator.DONE) {
if (!isValidNcName(c)) return false;
c = iter.next();
}
return true;
}
}
代码示例来源:origin: org.modeshape/modeshape-common
@Override
public boolean isNextValidXmlNcNameCharacter() {
int nextIndex = lastIndex + 1;
return nextIndex <= maxIndex && XmlCharacters.isValidNcName(content[nextIndex]);
}
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
protected String parseNCName( TokenStream tokens ) {
String name = tokens.consume();
if (!XmlCharacters.isValidNcName(name)) {
throw new ParsingException(tokens.previousPosition(), "Expected valid NCName but found " + name);
}
return name;
}
代码示例来源:origin: ModeShape/modeshape
protected String parseNCName( TokenStream tokens ) {
String name = tokens.consume();
if (!XmlCharacters.isValidNcName(name)) {
throw new ParsingException(tokens.previousPosition(), "Expected valid NCName but found " + name);
}
return name;
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
protected BindVariableName parseBindVariableName( TokenStream tokens,
TypeSystem typeSystem ) {
// The variable name must conform to a valid prefix, which is defined as a valid NCName ...
String value = tokens.consume();
if (!XmlCharacters.isValidNcName(value)) {
Position pos = tokens.previousPosition();
String msg = GraphI18n.bindVariableMustConformToNcName.text(value, pos.getLine(), pos.getColumn());
throw new ParsingException(pos, msg);
}
return bindVariableName(value);
}
代码示例来源:origin: ModeShape/modeshape
protected BindVariableName parseBindVariableName( TokenStream tokens,
TypeSystem typeSystem ) {
// The variable name must conform to a valid prefix, which is defined as a valid NCName ...
String value = tokens.consume();
if (!XmlCharacters.isValidNcName(value)) {
Position pos = tokens.previousPosition();
String msg = GraphI18n.bindVariableMustConformToNcName.text(value, pos.getLine(), pos.getColumn());
throw new ParsingException(pos, msg);
}
return bindVariableName(value);
}
代码示例来源:origin: ModeShape/modeshape
if (!XmlCharacters.isValidNcName(prefix)) {
throw new NamespaceException(JcrI18n.unableToRegisterNamespaceWithInvalidPrefix.text(prefix, uri));
代码示例来源:origin: org.fcrepo/modeshape-jcr
if (!XmlCharacters.isValidNcName(prefix)) {
throw new NamespaceException(JcrI18n.unableToRegisterNamespaceWithInvalidPrefix.text(prefix, uri));
代码示例来源:origin: org.modeshape/modeshape-graph
protected StaticOperand parseStaticOperand( TokenStream tokens,
TypeSystem typeSystem ) {
if (tokens.canConsume('$')) {
// The variable name must conform to a valid prefix, which is defined as a valid NCName ...
String value = tokens.consume();
if (!XmlCharacters.isValidNcName(value)) {
Position pos = tokens.previousPosition();
String msg = GraphI18n.bindVariableMustConformToNcName.text(value, pos.getLine(), pos.getColumn());
throw new ParsingException(pos, msg);
}
return bindVariableName(value);
}
if (tokens.canConsume('(')) {
// Sometimes the subqueries are wrapped with parentheses ...
StaticOperand result = parseStaticOperand(tokens, typeSystem);
tokens.consume(')');
return result;
}
if (tokens.matches("SELECT")) {
// This is a subquery. This object is stateless, so we can reuse this object ...
QueryCommand subqueryExpression = parseQueryCommand(tokens, typeSystem);
return subquery(subqueryExpression);
}
return parseLiteral(tokens, typeSystem);
}
代码示例来源:origin: ModeShape/modeshape
pos = input.position(input.index());
int tokenType = XmlCharacters.isValidNcName(c) ? WORD : OTHER;
while (input.isNextValidXmlNcNameCharacter() && !input.isNextAnyOf(".-")) {
c = input.next();
本文整理了Java中org.modeshape.common.xml.XmlCharacters.isValidNameStart()方法的一些代码示例,展示了XmlCharacters.isVali
本文整理了Java中org.modeshape.common.xml.XmlCharacters.isValidNcName()方法的一些代码示例,展示了XmlCharacters.isValidNc
本文整理了Java中org.modeshape.common.xml.XmlCharacters.isValid()方法的一些代码示例,展示了XmlCharacters.isValid()的具体用法。
本文整理了Java中org.modeshape.common.xml.XmlCharacters.isValidNcNameStart()方法的一些代码示例,展示了XmlCharacters.isVa
我是一名优秀的程序员,十分优秀!