1 55 package org.jboss.axis.types; 56 57 import org.jboss.axis.utils.Messages; 58 import org.jboss.axis.utils.XMLChar; 59 60 72 public class NMToken extends Token 73 { 74 75 public NMToken() 76 { 77 super(); 78 } 79 80 85 public NMToken(String stValue) throws IllegalArgumentException 86 { 87 try 88 { 89 setValue(stValue); 90 } 91 catch (IllegalArgumentException e) 92 { 93 throw new IllegalArgumentException (Messages.getMessage("badNmtoken00") + "data=[" + 95 stValue + "]"); 96 } 97 } 98 99 104 public boolean isValid(String stValue) 105 { 106 int scan; 107 108 for (scan = 0; scan < stValue.length(); scan++) 109 { 110 if (XMLChar.isName(stValue.charAt(scan)) == false) 111 return false; 112 } 113 114 return true; 115 } 116 } 117 | Popular Tags |