org.apache.xml.utils.XMLCharacterRecognizer类的使用及代码示例

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

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

XMLCharacterRecognizer介绍

[英]Class used to verify whether the specified ch conforms to the XML 1.0 definition of whitespace.
[中]类,用于验证指定的ch是否符合XML 1.0的空白定义。

代码示例

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

  1. /**
  2. * Returns whether the specified <var>ch</var> conforms to the XML 1.0 definition
  3. * of whitespace. Refer to <A href="http://www.w3.org/TR/1998/REC-xml-19980210#NT-S">
  4. * the definition of <CODE>S</CODE></A> for details.
  5. * @param ch Character to check as XML whitespace.
  6. * @return =true if <var>ch</var> is XML whitespace; otherwise =false.
  7. */
  8. private static boolean isSpace(char ch)
  9. {
  10. return XMLCharacterRecognizer.isWhiteSpace(ch); // Take the easy way out for now.
  11. }

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

  1. /**
  2. * Returns whether the specified <var>ch</var> conforms to the XML 1.0 definition
  3. * of whitespace. Refer to <A href="http://www.w3.org/TR/1998/REC-xml-19980210#NT-S">
  4. * the definition of <CODE>S</CODE></A> for details.
  5. * @param ch Character to check as XML whitespace.
  6. * @return =true if <var>ch</var> is XML whitespace; otherwise =false.
  7. */
  8. private static boolean isSpace(char ch)
  9. {
  10. return XMLCharacterRecognizer.isWhiteSpace(ch); // Take the easy way out for now.
  11. }

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

  1. /**
  2. * Returns whether the specified <var>ch</var> conforms to the XML 1.0 definition
  3. * of whitespace. Refer to <A href="http://www.w3.org/TR/1998/REC-xml-19980210#NT-S">
  4. * the definition of <CODE>S</CODE></A> for details.
  5. * @param ch Character to check as XML whitespace.
  6. * @return =true if <var>ch</var> is XML whitespace; otherwise =false.
  7. */
  8. private static boolean isSpace(char ch)
  9. {
  10. return XMLCharacterRecognizer.isWhiteSpace(ch); // Take the easy way out for now.
  11. }

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

  1. /**
  2. * Returns whether the specified <var>ch</var> conforms to the XML 1.0 definition
  3. * of whitespace. Refer to <A href="http://www.w3.org/TR/1998/REC-xml-19980210#NT-S">
  4. * the definition of <CODE>S</CODE></A> for details.
  5. * @param ch Character to check as XML whitespace.
  6. * @return =true if <var>ch</var> is XML whitespace; otherwise =false.
  7. */
  8. private static boolean isSpace(char ch)
  9. {
  10. return XMLCharacterRecognizer.isWhiteSpace(ch); // Take the easy way out for now.
  11. }

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

  1. /**
  2. * Returns whether the specified <var>ch</var> conforms to the XML 1.0 definition
  3. * of whitespace. Refer to <A href="http://www.w3.org/TR/1998/REC-xml-19980210#NT-S">
  4. * the definition of <CODE>S</CODE></A> for details.
  5. * @param ch Character to check as XML whitespace.
  6. * @return =true if <var>ch</var> is XML whitespace; otherwise =false.
  7. */
  8. private static boolean isSpace(char ch)
  9. {
  10. return XMLCharacterRecognizer.isWhiteSpace(ch); // Take the easy way out for now.
  11. }

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

  1. /**
  2. * Returns whether the specified <var>ch</var> conforms to the XML 1.0 definition
  3. * of whitespace. Refer to <A href="http://www.w3.org/TR/1998/REC-xml-19980210#NT-S">
  4. * the definition of <CODE>S</CODE></A> for details.
  5. * @param ch Character to check as XML whitespace.
  6. * @return =true if <var>ch</var> is XML whitespace; otherwise =false.
  7. */
  8. private static boolean isSpace(char ch)
  9. {
  10. return XMLCharacterRecognizer.isWhiteSpace(ch); // Take the easy way out for now.
  11. }

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

  1. /**
  2. * Tell if the string is whitespace.
  3. *
  4. * @param ch Character array to check as XML whitespace.
  5. * @param start Start index of characters in the array
  6. * @param length Number of characters in the array
  7. * @return True if the characters in the array are
  8. * XML whitespace; otherwise, false.
  9. */
  10. public static boolean isWhiteSpace(char ch[], int start, int length)
  11. {
  12. int end = start + length;
  13. for (int s = start; s < end; s++)
  14. {
  15. if (!isWhiteSpace(ch[s]))
  16. return false;
  17. }
  18. return true;
  19. }

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

  1. /**
  2. * Tell if the string is whitespace.
  3. *
  4. * @param ch Character array to check as XML whitespace.
  5. * @param start Start index of characters in the array
  6. * @param length Number of characters in the array
  7. * @return True if the characters in the array are
  8. * XML whitespace; otherwise, false.
  9. */
  10. public static boolean isWhiteSpace(char ch[], int start, int length)
  11. {
  12. int end = start + length;
  13. for (int s = start; s < end; s++)
  14. {
  15. if (!isWhiteSpace(ch[s]))
  16. return false;
  17. }
  18. return true;
  19. }

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

  1. /**
  2. * Tell if the string is whitespace.
  3. *
  4. * @param buf StringBuffer to check as XML whitespace.
  5. * @return True if characters in buffer are XML whitespace, false otherwise
  6. */
  7. public static boolean isWhiteSpace(StringBuffer buf)
  8. {
  9. int n = buf.length();
  10. for (int i = 0; i < n; i++)
  11. {
  12. if (!isWhiteSpace(buf.charAt(i)))
  13. return false;
  14. }
  15. return true;
  16. }

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

  1. /**
  2. * Tell if the string is whitespace.
  3. *
  4. * @param buf StringBuffer to check as XML whitespace.
  5. * @return True if characters in buffer are XML whitespace, false otherwise
  6. */
  7. public static boolean isWhiteSpace(StringBuffer buf)
  8. {
  9. int n = buf.length();
  10. for (int i = 0; i < n; i++)
  11. {
  12. if (!isWhiteSpace(buf.charAt(i)))
  13. return false;
  14. }
  15. return true;
  16. }

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

  1. /**
  2. * Tell if the string is whitespace.
  3. *
  4. * @param s String to check as XML whitespace.
  5. * @return True if characters in buffer are XML whitespace, false otherwise
  6. */
  7. public static boolean isWhiteSpace(String s)
  8. {
  9. if(null != s)
  10. {
  11. int n = s.length();
  12. for (int i = 0; i < n; i++)
  13. {
  14. if (!isWhiteSpace(s.charAt(i)))
  15. return false;
  16. }
  17. }
  18. return true;
  19. }

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

  1. /**
  2. * Tell if the string is whitespace.
  3. *
  4. * @param s String to check as XML whitespace.
  5. * @return True if characters in buffer are XML whitespace, false otherwise
  6. */
  7. public static boolean isWhiteSpace(String s)
  8. {
  9. if(null != s)
  10. {
  11. int n = s.length();
  12. for (int i = 0; i < n; i++)
  13. {
  14. if (!isWhiteSpace(s.charAt(i)))
  15. return false;
  16. }
  17. }
  18. return true;
  19. }

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

  1. && XMLCharacterRecognizer.isWhiteSpace(ch[currPos]);
  2. currPos++) { }
  3. && !XMLCharacterRecognizer.isWhiteSpace(ch[currPos]);
  4. currPos++) { }
  5. && XMLCharacterRecognizer.isWhiteSpace(ch[currPos]);
  6. currPos++) { }

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

  1. && XMLCharacterRecognizer.isWhiteSpace(ch[currPos]);
  2. currPos++) { }
  3. && !XMLCharacterRecognizer.isWhiteSpace(ch[currPos]);
  4. currPos++) { }
  5. && XMLCharacterRecognizer.isWhiteSpace(ch[currPos]);
  6. currPos++) { }

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

  1. chunkOK = m_innerFSB.isWhitespace(sourcecolumn, runlength);
  2. else
  3. chunkOK = org.apache.xml.utils.XMLCharacterRecognizer.isWhiteSpace(
  4. m_array[sourcechunk], sourcecolumn, runlength);

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

  1. chunkOK = m_innerFSB.isWhitespace(sourcecolumn, runlength);
  2. else
  3. chunkOK = org.apache.xml.utils.XMLCharacterRecognizer.isWhiteSpace(
  4. m_array[sourcechunk], sourcecolumn, runlength);

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

  1. if (!XMLCharacterRecognizer.isWhiteSpace(valueString.charAt(i)))
  2. break;
  3. if (i == m_length) return Double.NaN;
  4. if (!XMLCharacterRecognizer.isWhiteSpace(valueString.charAt(i)))
  5. break;
  6. if (i != m_length)

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

  1. /**
  2. * If available, when the disable-output-escaping attribute is used,
  3. * output raw text without escaping. A PI will be inserted in front
  4. * of the node with the name "lotusxsl-next-is-raw" and a value of
  5. * "formatter-to-dom".
  6. *
  7. * @param ch Array containing the characters
  8. * @param start Index to start of characters in the array
  9. * @param length Number of characters in the array
  10. */
  11. public void charactersRaw(char ch[], int start, int length)
  12. throws org.xml.sax.SAXException
  13. {
  14. if(isOutsideDocElem()
  15. && org.apache.xml.utils.XMLCharacterRecognizer.isWhiteSpace(ch, start, length))
  16. return; // avoid DOM006 Hierarchy request error
  17. String s = new String(ch, start, length);
  18. append(m_doc.createProcessingInstruction("xslt-next-is-raw",
  19. "formatter-to-dom"));
  20. append(m_doc.createTextNode(s));
  21. }

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

  1. if (!XMLCharacterRecognizer.isWhiteSpace(valueString.charAt(i)))
  2. break;
  3. if (i == m_length) return Double.NaN;
  4. if (!XMLCharacterRecognizer.isWhiteSpace(valueString.charAt(i)))
  5. break;
  6. if (i != m_length)

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

  1. /**
  2. * If available, when the disable-output-escaping attribute is used,
  3. * output raw text without escaping. A PI will be inserted in front
  4. * of the node with the name "lotusxsl-next-is-raw" and a value of
  5. * "formatter-to-dom".
  6. *
  7. * @param ch Array containing the characters
  8. * @param start Index to start of characters in the array
  9. * @param length Number of characters in the array
  10. */
  11. public void charactersRaw(char ch[], int start, int length)
  12. throws org.xml.sax.SAXException
  13. {
  14. if(isOutsideDocElem()
  15. && org.apache.xml.utils.XMLCharacterRecognizer.isWhiteSpace(ch, start, length))
  16. return; // avoid DOM006 Hierarchy request error
  17. String s = new String(ch, start, length);
  18. append(m_doc.createProcessingInstruction("xslt-next-is-raw",
  19. "formatter-to-dom"));
  20. append(m_doc.createTextNode(s));
  21. }

相关文章

XMLCharacterRecognizer类方法