当前位置: 首页>>代码示例>>Java>>正文


Java Utf16Util.isXmlName方法代码示例

本文整理汇总了Java中org.waveprotocol.wave.model.util.Utf16Util.isXmlName方法的典型用法代码示例。如果您正苦于以下问题:Java Utf16Util.isXmlName方法的具体用法?Java Utf16Util.isXmlName怎么用?Java Utf16Util.isXmlName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.waveprotocol.wave.model.util.Utf16Util的用法示例。


在下文中一共展示了Utf16Util.isXmlName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkAttributesUpdateWellFormed

import org.waveprotocol.wave.model.util.Utf16Util; //导入方法依赖的package包/类
private ValidationResult checkAttributesUpdateWellFormed(AttributesUpdate u,
    ViolationCollector v) {
  if (u == null) { return nullAttributesUpdate(v); }
  String previousKey = null;
  for (int i = 0; i < u.changeSize(); i++) {
    String key = u.getChangeKey(i);
    if (key == null) { return nullAttributeKey(v); }
    if (!Utf16Util.isXmlName(key)) { return attributeNameNotXmlName(v, key); }
    if (previousKey != null && previousKey.compareTo(key) >= 0) {
      return attributeKeysNotStrictlyMonotonic(v, previousKey, key);
    }
    if (u.getOldValue(i) != null && !Utf16Util.isValidUtf16(u.getOldValue(i))) {
      return attributeValueNotValidUtf16(v);
    }
    if (u.getNewValue(i) != null && !Utf16Util.isValidUtf16(u.getNewValue(i))) {
      return attributeValueNotValidUtf16(v);
    }
    previousKey = key;
  }
  return ValidationResult.VALID;
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:22,代码来源:DocOpAutomaton.java

示例2: checkAttributesWellFormed

import org.waveprotocol.wave.model.util.Utf16Util; //导入方法依赖的package包/类
private ValidationResult checkAttributesWellFormed(Attributes attr, ViolationCollector v) {
  if (attr == null) { return nullAttributes(v); }
  String previousKey = null;
  for (Map.Entry<String, String> e : attr.entrySet()) {
    if (e.getKey() == null) { return nullAttributeKey(v); }
    if (!Utf16Util.isXmlName(e.getKey())) { return attributeNameNotXmlName(v, e.getKey()); }
    if (e.getValue() == null) { return nullAttributeValue(v); }
    if (!Utf16Util.isValidUtf16(e.getValue())) { return attributeValueNotValidUtf16(v); }
    if (previousKey != null && previousKey.compareTo(e.getKey()) >= 0) {
      return attributeKeysNotStrictlyMonotonic(v, previousKey, e.getKey());
    }
    previousKey = e.getKey();
  }
  return ValidationResult.VALID;
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:16,代码来源:DocOpAutomaton.java

示例3: checkElementType

import org.waveprotocol.wave.model.util.Utf16Util; //导入方法依赖的package包/类
private static void checkElementType(String name) throws InvalidSchemaException {
  if (!Utf16Util.isXmlName(name)) {
    throw new InvalidSchemaException("Invalid element type: " + name);
  }
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:6,代码来源:SchemaFactory.java

示例4: checkAttributeName

import org.waveprotocol.wave.model.util.Utf16Util; //导入方法依赖的package包/类
private static void checkAttributeName(String name) throws InvalidSchemaException {
  if (!Utf16Util.isXmlName(name)) {
    throw new InvalidSchemaException("Invalid attribute name: " + name);
  }
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:6,代码来源:SchemaFactory.java

示例5: checkValidTagName

import org.waveprotocol.wave.model.util.Utf16Util; //导入方法依赖的package包/类
private void checkValidTagName(String tagName) {
  if (!Utf16Util.isXmlName(tagName)) {
    Preconditions.illegalArgument("Invalid tag name: '" + tagName + "'");
  }
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:6,代码来源:XmlStringBuilderDoc.java

示例6: checkValidAttributeName

import org.waveprotocol.wave.model.util.Utf16Util; //导入方法依赖的package包/类
private void checkValidAttributeName(String tagName) {
  if (!Utf16Util.isXmlName(tagName)) {
    Preconditions.illegalArgument("Invalid attribute name: '" + tagName + "'");
  }
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:6,代码来源:XmlStringBuilderDoc.java


注:本文中的org.waveprotocol.wave.model.util.Utf16Util.isXmlName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。