public static void checkValidXmlName(String name) { if (name == null) throw new NullPointerException("Name cannot be null"); if (!XmlGrammar.xmlName().matcher(name).matches()) throw new IllegalArgumentException("Not a valid XML Name"); }
public static boolean isNameChar(int codePoint) { return isNameStartChar(codePoint) || codePoint == '-' || codePoint == '.' || (codePoint >= '0' && codePoint <= '9') || codePoint == 0x00B7 || (codePoint >= 0x0300 && codePoint <= 0x036F) || (codePoint >= 0x203F && codePoint <= 0x2040); } }
public static void checkValidCommentText(String text) { if (text == null) throw new NullPointerException("Text cannot be null"); if (!XmlGrammar.xmlCommentText().matcher(text).matches()) throw new IllegalArgumentException("Not a valid XML Comment text"); }
private void convertCharRef(WtXmlCharRef n) { int codePoint = n.getCodePoint(); if (!XmlGrammar.isChar(codePoint)) { // The & will be escaped and therefore the whole thing will be // rendered as plain text, indicating that something unrepresentable // was processed here. appendInconvertible(n, false); } else { appendText(new String(Character.toChars(codePoint))); } }
public static String xmlDecode(String text, XmlEntityResolver resolver) Pattern rx = XmlGrammar.xmlReference();
private void convertCharRef(WtXmlCharRef n) { int codePoint = n.getCodePoint(); if (!XmlGrammar.isChar(codePoint)) { // The & will be escaped and therefore the whole thing will be // rendered as plain text, indicating that something unrepresentable // was processed here. appendInconvertible(n, false); } else { appendText(new String(Character.toChars(codePoint))); } }
public static void checkValidXmlName(String name) { if (name == null) throw new NullPointerException("Name cannot be null"); if (!XmlGrammar.xmlName().matcher(name).matches()) throw new IllegalArgumentException("Not a valid XML Name"); }
public static void checkValidCommentText(String text) { if (text == null) throw new NullPointerException("Text cannot be null"); if (!XmlGrammar.xmlCommentText().matcher(text).matches()) throw new IllegalArgumentException("Not a valid XML Comment text"); }
break tryBlock; String nameAsString = n.getName().getAsString(); if (!XmlGrammar.xmlName().matcher(nameAsString).matches()) break tryBlock; if (nameAsString.indexOf(':') != -1)
break tryBlock; String nameAsString = n.getName().getAsString(); if (!XmlGrammar.xmlName().matcher(nameAsString).matches()) break tryBlock; if (nameAsString.indexOf(':') != -1)
if (!XmlGrammar.xmlName().matcher(argName).matches()) continue;
if (!XmlGrammar.xmlName().matcher(argName).matches()) continue;