Ejemplo n.º 1
0
 //	protected void checkNodeID(Taint taintMe, String str) throws SAXParseException {
 //		if (!XMLChar.isValidNCName(str)) {
 //			warning(taintMe,
 //				WARN_BAD_NAME,
 //				"Not an XML Name: '" + str + "'");
 //		}
 //	}
 public void checkString(Taint taintMe, String t) throws SAXParseException {
   if (!CharacterModel.isNormalFormC(t))
     warning(
         taintMe,
         WARN_STRING_NOT_NORMAL_FORM_C,
         "String not in Unicode Normal Form C: \"" + t + "\"");
   checkEncoding(taintMe, t);
   checkComposingChar(taintMe, t);
 }
Ejemplo n.º 2
0
 void checkComposingChar(Taint taintMe, String t) throws SAXParseException {
   if (CharacterModel.startsWithComposingCharacter(t))
     warning(
         taintMe,
         WARN_STRING_COMPOSING_CHAR,
         "String is not legal in XML 1.1; starts with composing char: \""
             + t
             + "\" ("
             + ((int) t.charAt(0))
             + ")");
 }
Ejemplo n.º 3
0
 public void checkComposingChar(Taint taintMe, char ch[], int st, int ln)
     throws SAXParseException {
   if (ln > 0 && CharacterModel.isComposingChar(ch[st]))
     warning(
         taintMe,
         WARN_STRING_COMPOSING_CHAR,
         "String is not legal in XML 1.1; starts with composing char: \""
             + new String(ch, st, ln)
             + "\" ("
             + (int) ch[st]
             + ")");
 }