1 16 package org.apache.axis.types; 17 18 import org.apache.axis.utils.Messages; 19 import org.apache.axis.utils.XMLChar; 20 21 32 public class NMToken extends Token { 33 34 public NMToken() { 35 super(); 36 } 37 38 42 public NMToken(String stValue) throws IllegalArgumentException { 43 try { 44 setValue(stValue); 45 } 46 catch (IllegalArgumentException e) { 47 throw new IllegalArgumentException ( 49 Messages.getMessage("badNmtoken00") + "data=[" + 50 stValue + "]"); 51 } 52 } 53 54 60 public static boolean isValid(String stValue) { 61 int scan; 62 63 for (scan=0; scan < stValue.length(); scan++) { 64 if (XMLChar.isName(stValue.charAt(scan)) == false) 65 return false; 66 } 67 68 return true; 69 } 70 } 71 | Popular Tags |