org.apache.batik.xml.XMLUtilities.isXMLNameFirstCharacter()方法的使用及代码示例

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

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

XMLUtilities.isXMLNameFirstCharacter介绍

[英]Tests whether the given character is usable as the first character of an XML name.
[中]测试给定字符是否可用作XML名称的第一个字符。

代码示例

代码示例来源:origin: org.apache.xmlgraphics/batik-xml

  1. if (!isXMLNameFirstCharacter(c)) {
  2. return 0;

代码示例来源:origin: fr.avianey.apache-xmlgraphics/batik

  1. if (!isXMLNameFirstCharacter(c)) {
  2. return 0;

代码示例来源:origin: apache/batik

  1. if (!isXMLNameFirstCharacter(c)) {
  2. return 0;

代码示例来源:origin: org.apache.xmlgraphics/batik-xml

  1. /**
  2. * Reads a name. The current character must be the first character.
  3. * @param type The lexical unit type to set.
  4. * @return type.
  5. */
  6. protected int readName(int type) throws IOException, XMLException {
  7. if (current == -1) {
  8. throw createXMLException("unexpected.eof");
  9. }
  10. if (!XMLUtilities.isXMLNameFirstCharacter((char)current)) {
  11. throw createXMLException("invalid.name");
  12. }
  13. do {
  14. nextChar();
  15. } while (current != -1 &&
  16. XMLUtilities.isXMLNameCharacter((char)current));
  17. return type;
  18. }

代码示例来源:origin: fr.avianey.apache-xmlgraphics/batik

  1. float offset = parseOffset();
  2. ret = new Object[] { new Integer(TIME_OFFSET), new Float(offset) };
  3. } else if (XMLUtilities.isXMLNameFirstCharacter((char) current)) {
  4. ret = parseIDValue(escaped);
  5. } else {

代码示例来源:origin: fr.avianey.apache-xmlgraphics/batik

  1. /**
  2. * Reads a name. The current character must be the first character.
  3. * @param type The lexical unit type to set.
  4. * @return type.
  5. */
  6. protected int readName(int type) throws IOException, XMLException {
  7. if (current == -1) {
  8. throw createXMLException("unexpected.eof");
  9. }
  10. if (!XMLUtilities.isXMLNameFirstCharacter((char)current)) {
  11. throw createXMLException("invalid.name");
  12. }
  13. do {
  14. nextChar();
  15. } while (current != -1 &&
  16. XMLUtilities.isXMLNameCharacter((char)current));
  17. return type;
  18. }

代码示例来源:origin: apache/batik

  1. /**
  2. * Reads a name. The current character must be the first character.
  3. * @param type The lexical unit type to set.
  4. * @return type.
  5. */
  6. protected int readName(int type) throws IOException, XMLException {
  7. if (current == -1) {
  8. throw createXMLException("unexpected.eof");
  9. }
  10. if (!XMLUtilities.isXMLNameFirstCharacter((char)current)) {
  11. throw createXMLException("invalid.name");
  12. }
  13. do {
  14. nextChar();
  15. } while (current != -1 &&
  16. XMLUtilities.isXMLNameCharacter((char)current));
  17. return type;
  18. }

代码示例来源:origin: apache/batik

  1. float offset = parseOffset();
  2. ret = new Object[] {TIME_OFFSET, offset};
  3. } else if (XMLUtilities.isXMLNameFirstCharacter((char) current)) {
  4. ret = parseIDValue(escaped);
  5. } else {

代码示例来源:origin: org.apache.xmlgraphics/batik-parser

  1. float offset = parseOffset();
  2. ret = new Object[] {TIME_OFFSET, offset};
  3. } else if (XMLUtilities.isXMLNameFirstCharacter((char) current)) {
  4. ret = parseIDValue(escaped);
  5. } else {

代码示例来源:origin: org.apache.xmlgraphics/batik-xml

  1. /**
  2. * Reads a parameter entity reference. The current character must be '%'.
  3. * @return type.
  4. */
  5. protected int readPEReference() throws IOException, XMLException {
  6. nextChar();
  7. if (current == -1) {
  8. throw createXMLException("unexpected.eof");
  9. }
  10. if (!XMLUtilities.isXMLNameFirstCharacter((char)current)) {
  11. throw createXMLException("invalid.parameter.entity");
  12. }
  13. do {
  14. nextChar();
  15. } while (current != -1 &&
  16. XMLUtilities.isXMLNameCharacter((char)current));
  17. if (current != ';') {
  18. throw createXMLException("invalid.parameter.entity");
  19. }
  20. nextChar();
  21. return LexicalUnits.PARAMETER_ENTITY_REFERENCE;
  22. }

代码示例来源:origin: apache/batik

  1. /**
  2. * Reads a parameter entity reference. The current character must be '%'.
  3. * @return type.
  4. */
  5. protected int readPEReference() throws IOException, XMLException {
  6. nextChar();
  7. if (current == -1) {
  8. throw createXMLException("unexpected.eof");
  9. }
  10. if (!XMLUtilities.isXMLNameFirstCharacter((char)current)) {
  11. throw createXMLException("invalid.parameter.entity");
  12. }
  13. do {
  14. nextChar();
  15. } while (current != -1 &&
  16. XMLUtilities.isXMLNameCharacter((char)current));
  17. if (current != ';') {
  18. throw createXMLException("invalid.parameter.entity");
  19. }
  20. nextChar();
  21. return LexicalUnits.PARAMETER_ENTITY_REFERENCE;
  22. }

代码示例来源:origin: fr.avianey.apache-xmlgraphics/batik

  1. /**
  2. * Reads a parameter entity reference. The current character must be '%'.
  3. * @return type.
  4. */
  5. protected int readPEReference() throws IOException, XMLException {
  6. nextChar();
  7. if (current == -1) {
  8. throw createXMLException("unexpected.eof");
  9. }
  10. if (!XMLUtilities.isXMLNameFirstCharacter((char)current)) {
  11. throw createXMLException("invalid.parameter.entity");
  12. }
  13. do {
  14. nextChar();
  15. } while (current != -1 &&
  16. XMLUtilities.isXMLNameCharacter((char)current));
  17. if (current != ';') {
  18. throw createXMLException("invalid.parameter.entity");
  19. }
  20. nextChar();
  21. return LexicalUnits.PARAMETER_ENTITY_REFERENCE;
  22. }

代码示例来源:origin: fr.avianey.apache-xmlgraphics/batik

  1. throw createXMLException("unexpected.eof");
  2. if (!XMLUtilities.isXMLNameFirstCharacter((char)current)) {
  3. throw createXMLException("malformed.pi.target");

代码示例来源:origin: org.apache.xmlgraphics/batik-xml

  1. throw createXMLException("unexpected.eof");
  2. if (!XMLUtilities.isXMLNameFirstCharacter((char)current)) {
  3. throw createXMLException("malformed.pi.target");

代码示例来源:origin: apache/batik

  1. throw createXMLException("unexpected.eof");
  2. if (!XMLUtilities.isXMLNameFirstCharacter((char)current)) {
  3. throw createXMLException("malformed.pi.target");

代码示例来源:origin: fr.avianey.apache-xmlgraphics/batik

  1. return;
  2. default:
  3. if (XMLUtilities.isXMLNameFirstCharacter((char) current)) {
  4. do {
  5. nextChar();

代码示例来源:origin: org.apache.xmlgraphics/batik-bridge

  1. return;
  2. default:
  3. if (XMLUtilities.isXMLNameFirstCharacter((char) current)) {
  4. do {
  5. nextChar();

代码示例来源:origin: org.apache.xmlgraphics/batik-xml

  1. int c1 = nextChar();
  2. if (c1 == -1 ||
  3. !XMLUtilities.isXMLNameFirstCharacter((char)c1)) {
  4. throw createXMLException("invalid.pi.target");

代码示例来源:origin: fr.avianey.apache-xmlgraphics/batik

  1. int c1 = nextChar();
  2. if (c1 == -1 ||
  3. !XMLUtilities.isXMLNameFirstCharacter((char)c1)) {
  4. throw createXMLException("invalid.pi.target");

代码示例来源:origin: apache/batik

  1. int c1 = nextChar();
  2. if (c1 == -1 ||
  3. !XMLUtilities.isXMLNameFirstCharacter((char)c1)) {
  4. throw createXMLException("invalid.pi.target");

相关文章