org.apache.xml.utils.XML11Char.isXML11Name()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(9.2k)|赞(0)|评价(0)|浏览(156)

本文整理了Java中org.apache.xml.utils.XML11Char.isXML11Name()方法的一些代码示例,展示了XML11Char.isXML11Name()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XML11Char.isXML11Name()方法的具体详情如下:
包路径:org.apache.xml.utils.XML11Char
类名称:XML11Char
方法名:isXML11Name

XML11Char.isXML11Name介绍

[英]Returns true if the specified character is a valid name character as defined by production [4a] in the XML 1.1 specification.
[中]如果指定的字符是XML 1.1规范中生产[4a]定义的有效名称字符,则返回true。

代码示例

代码示例来源:origin: robovm/robovm

/**
 * Check to see if a string is a valid Nmtoken according to [7]
 * in the XML 1.1 Recommendation
 *
 * @param nmtoken string to check
 * @return true if nmtoken is a valid Nmtoken 
 */
public static boolean isXML11ValidNmtoken(String nmtoken) {
  int length = nmtoken.length();
  if (length == 0)
    return false;
  for (int i = 0; i < length; ++i ) {
    char ch = nmtoken.charAt(i);
    if( !isXML11Name(ch) ) {
      if ( ++i < length && isXML11NameHighSurrogate(ch) ) {
        char ch2 = nmtoken.charAt(i);
        if ( !XMLChar.isLowSurrogate(ch2) || 
           !isXML11Name(XMLChar.supplemental(ch, ch2)) ) {
          return false;
        }
      }
      else {
        return false;
      }
    }
  }
  return true;
} // isXML11ValidName(String):boolean

代码示例来源:origin: robovm/robovm

if ( !isXML11Name(ch) ) {
  if ( ++i < length && isXML11NameHighSurrogate(ch) ) {
    char ch2 = name.charAt(i);
    if ( !XMLChar.isLowSurrogate(ch2) || 
       !isXML11Name(XMLChar.supplemental(ch, ch2)) ) {
      return false;

代码示例来源:origin: xalan/xalan

if ( !isXML11Name(ch) ) {
  if ( ++i < length && isXML11NameHighSurrogate(ch) ) {
    char ch2 = name.charAt(i);
    if ( !XMLChar.isLowSurrogate(ch2) || 
       !isXML11Name(XMLChar.supplemental(ch, ch2)) ) {
      return false;

代码示例来源:origin: xalan/xalan

/**
 * Check to see if a string is a valid Nmtoken according to [7]
 * in the XML 1.1 Recommendation
 *
 * @param nmtoken string to check
 * @return true if nmtoken is a valid Nmtoken 
 */
public static boolean isXML11ValidNmtoken(String nmtoken) {
  int length = nmtoken.length();
  if (length == 0)
    return false;
  for (int i = 0; i < length; ++i ) {
    char ch = nmtoken.charAt(i);
    if( !isXML11Name(ch) ) {
      if ( ++i < length && isXML11NameHighSurrogate(ch) ) {
        char ch2 = nmtoken.charAt(i);
        if ( !XMLChar.isLowSurrogate(ch2) || 
           !isXML11Name(XMLChar.supplemental(ch, ch2)) ) {
          return false;
        }
      }
      else {
        return false;
      }
    }
  }
  return true;
} // isXML11ValidName(String):boolean

代码示例来源:origin: MobiVM/robovm

if ( !isXML11Name(ch) ) {
  if ( ++i < length && isXML11NameHighSurrogate(ch) ) {
    char ch2 = name.charAt(i);
    if ( !XMLChar.isLowSurrogate(ch2) || 
       !isXML11Name(XMLChar.supplemental(ch, ch2)) ) {
      return false;

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Check to see if a string is a valid Nmtoken according to [7]
 * in the XML 1.1 Recommendation
 *
 * @param nmtoken string to check
 * @return true if nmtoken is a valid Nmtoken 
 */
public static boolean isXML11ValidNmtoken(String nmtoken) {
  int length = nmtoken.length();
  if (length == 0)
    return false;
  for (int i = 0; i < length; ++i ) {
    char ch = nmtoken.charAt(i);
    if( !isXML11Name(ch) ) {
      if ( ++i < length && isXML11NameHighSurrogate(ch) ) {
        char ch2 = nmtoken.charAt(i);
        if ( !XMLChar.isLowSurrogate(ch2) || 
           !isXML11Name(XMLChar.supplemental(ch, ch2)) ) {
          return false;
        }
      }
      else {
        return false;
      }
    }
  }
  return true;
} // isXML11ValidName(String):boolean

代码示例来源:origin: ibinti/bugvm

if ( !isXML11Name(ch) ) {
  if ( ++i < length && isXML11NameHighSurrogate(ch) ) {
    char ch2 = name.charAt(i);
    if ( !XMLChar.isLowSurrogate(ch2) || 
       !isXML11Name(XMLChar.supplemental(ch, ch2)) ) {
      return false;

代码示例来源:origin: FlexoVM/flexovm

/**
 * Check to see if a string is a valid Nmtoken according to [7]
 * in the XML 1.1 Recommendation
 *
 * @param nmtoken string to check
 * @return true if nmtoken is a valid Nmtoken 
 */
public static boolean isXML11ValidNmtoken(String nmtoken) {
  int length = nmtoken.length();
  if (length == 0)
    return false;
  for (int i = 0; i < length; ++i ) {
    char ch = nmtoken.charAt(i);
    if( !isXML11Name(ch) ) {
      if ( ++i < length && isXML11NameHighSurrogate(ch) ) {
        char ch2 = nmtoken.charAt(i);
        if ( !XMLChar.isLowSurrogate(ch2) || 
           !isXML11Name(XMLChar.supplemental(ch, ch2)) ) {
          return false;
        }
      }
      else {
        return false;
      }
    }
  }
  return true;
} // isXML11ValidName(String):boolean

代码示例来源:origin: com.gluonhq/robovm-rt

if ( !isXML11Name(ch) ) {
  if ( ++i < length && isXML11NameHighSurrogate(ch) ) {
    char ch2 = name.charAt(i);
    if ( !XMLChar.isLowSurrogate(ch2) || 
       !isXML11Name(XMLChar.supplemental(ch, ch2)) ) {
      return false;

代码示例来源:origin: MobiVM/robovm

/**
 * Check to see if a string is a valid Nmtoken according to [7]
 * in the XML 1.1 Recommendation
 *
 * @param nmtoken string to check
 * @return true if nmtoken is a valid Nmtoken 
 */
public static boolean isXML11ValidNmtoken(String nmtoken) {
  int length = nmtoken.length();
  if (length == 0)
    return false;
  for (int i = 0; i < length; ++i ) {
    char ch = nmtoken.charAt(i);
    if( !isXML11Name(ch) ) {
      if ( ++i < length && isXML11NameHighSurrogate(ch) ) {
        char ch2 = nmtoken.charAt(i);
        if ( !XMLChar.isLowSurrogate(ch2) || 
           !isXML11Name(XMLChar.supplemental(ch, ch2)) ) {
          return false;
        }
      }
      else {
        return false;
      }
    }
  }
  return true;
} // isXML11ValidName(String):boolean

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xalan

if ( !isXML11Name(ch) ) {
  if ( ++i < length && isXML11NameHighSurrogate(ch) ) {
    char ch2 = name.charAt(i);
    if ( !XMLChar.isLowSurrogate(ch2) || 
       !isXML11Name(XMLChar.supplemental(ch, ch2)) ) {
      return false;

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Check to see if a string is a valid Nmtoken according to [7]
 * in the XML 1.1 Recommendation
 *
 * @param nmtoken string to check
 * @return true if nmtoken is a valid Nmtoken 
 */
public static boolean isXML11ValidNmtoken(String nmtoken) {
  int length = nmtoken.length();
  if (length == 0)
    return false;
  for (int i = 0; i < length; ++i ) {
    char ch = nmtoken.charAt(i);
    if( !isXML11Name(ch) ) {
      if ( ++i < length && isXML11NameHighSurrogate(ch) ) {
        char ch2 = nmtoken.charAt(i);
        if ( !XMLChar.isLowSurrogate(ch2) || 
           !isXML11Name(XMLChar.supplemental(ch, ch2)) ) {
          return false;
        }
      }
      else {
        return false;
      }
    }
  }
  return true;
} // isXML11ValidName(String):boolean

代码示例来源:origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1

if ( !isXML11Name(ch) ) {
  if ( ++i < length && isXML11NameHighSurrogate(ch) ) {
    char ch2 = name.charAt(i);
    if ( !XMLChar.isLowSurrogate(ch2) || 
       !isXML11Name(XMLChar.supplemental(ch, ch2)) ) {
      return false;

代码示例来源:origin: org.apache.xalan/com.springsource.org.apache.xalan

/**
 * Check to see if a string is a valid Nmtoken according to [7]
 * in the XML 1.1 Recommendation
 *
 * @param nmtoken string to check
 * @return true if nmtoken is a valid Nmtoken 
 */
public static boolean isXML11ValidNmtoken(String nmtoken) {
  int length = nmtoken.length();
  if (length == 0)
    return false;
  for (int i = 0; i < length; ++i ) {
    char ch = nmtoken.charAt(i);
    if( !isXML11Name(ch) ) {
      if ( ++i < length && isXML11NameHighSurrogate(ch) ) {
        char ch2 = nmtoken.charAt(i);
        if ( !XMLChar.isLowSurrogate(ch2) || 
           !isXML11Name(XMLChar.supplemental(ch, ch2)) ) {
          return false;
        }
      }
      else {
        return false;
      }
    }
  }
  return true;
} // isXML11ValidName(String):boolean

代码示例来源:origin: FlexoVM/flexovm

if ( !isXML11Name(ch) ) {
  if ( ++i < length && isXML11NameHighSurrogate(ch) ) {
    char ch2 = name.charAt(i);
    if ( !XMLChar.isLowSurrogate(ch2) || 
       !isXML11Name(XMLChar.supplemental(ch, ch2)) ) {
      return false;

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Check to see if a string is a valid Nmtoken according to [7]
 * in the XML 1.1 Recommendation
 *
 * @param nmtoken string to check
 * @return true if nmtoken is a valid Nmtoken 
 */
public static boolean isXML11ValidNmtoken(String nmtoken) {
  int length = nmtoken.length();
  if (length == 0)
    return false;
  for (int i = 0; i < length; ++i ) {
    char ch = nmtoken.charAt(i);
    if( !isXML11Name(ch) ) {
      if ( ++i < length && isXML11NameHighSurrogate(ch) ) {
        char ch2 = nmtoken.charAt(i);
        if ( !XMLChar.isLowSurrogate(ch2) || 
           !isXML11Name(XMLChar.supplemental(ch, ch2)) ) {
          return false;
        }
      }
      else {
        return false;
      }
    }
  }
  return true;
} // isXML11ValidName(String):boolean

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

if ( !isXML11Name(ch) ) {
  if ( ++i < length && isXML11NameHighSurrogate(ch) ) {
    char ch2 = name.charAt(i);
    if ( !XMLChar.isLowSurrogate(ch2) || 
       !isXML11Name(XMLChar.supplemental(ch, ch2)) ) {
      return false;

代码示例来源:origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1

/**
 * Check to see if a string is a valid Nmtoken according to [7]
 * in the XML 1.1 Recommendation
 *
 * @param nmtoken string to check
 * @return true if nmtoken is a valid Nmtoken 
 */
public static boolean isXML11ValidNmtoken(String nmtoken) {
  int length = nmtoken.length();
  if (length == 0)
    return false;
  for (int i = 0; i < length; ++i ) {
    char ch = nmtoken.charAt(i);
    if( !isXML11Name(ch) ) {
      if ( ++i < length && isXML11NameHighSurrogate(ch) ) {
        char ch2 = nmtoken.charAt(i);
        if ( !XMLChar.isLowSurrogate(ch2) || 
           !isXML11Name(XMLChar.supplemental(ch, ch2)) ) {
          return false;
        }
      }
      else {
        return false;
      }
    }
  }
  return true;
} // isXML11ValidName(String):boolean

代码示例来源:origin: ibinti/bugvm

/**
 * Check to see if a string is a valid Nmtoken according to [7]
 * in the XML 1.1 Recommendation
 *
 * @param nmtoken string to check
 * @return true if nmtoken is a valid Nmtoken 
 */
public static boolean isXML11ValidNmtoken(String nmtoken) {
  int length = nmtoken.length();
  if (length == 0)
    return false;
  for (int i = 0; i < length; ++i ) {
    char ch = nmtoken.charAt(i);
    if( !isXML11Name(ch) ) {
      if ( ++i < length && isXML11NameHighSurrogate(ch) ) {
        char ch2 = nmtoken.charAt(i);
        if ( !XMLChar.isLowSurrogate(ch2) || 
           !isXML11Name(XMLChar.supplemental(ch, ch2)) ) {
          return false;
        }
      }
      else {
        return false;
      }
    }
  }
  return true;
} // isXML11ValidName(String):boolean

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xalan

/**
 * Check to see if a string is a valid Nmtoken according to [7]
 * in the XML 1.1 Recommendation
 *
 * @param nmtoken string to check
 * @return true if nmtoken is a valid Nmtoken 
 */
public static boolean isXML11ValidNmtoken(String nmtoken) {
  int length = nmtoken.length();
  if (length == 0)
    return false;
  for (int i = 0; i < length; ++i ) {
    char ch = nmtoken.charAt(i);
    if( !isXML11Name(ch) ) {
      if ( ++i < length && isXML11NameHighSurrogate(ch) ) {
        char ch2 = nmtoken.charAt(i);
        if ( !XMLChar.isLowSurrogate(ch2) || 
           !isXML11Name(XMLChar.supplemental(ch, ch2)) ) {
          return false;
        }
      }
      else {
        return false;
      }
    }
  }
  return true;
} // isXML11ValidName(String):boolean

相关文章