public int getLineNumber() {
   Location loc = getLocation();
   if (loc != null) {
     return loc.getLineNumber();
   }
   return -1;
 }
 public String getSystemId() {
   Location loc = getLocation();
   if (loc != null) {
     return loc.getSystemId();
   }
   return null;
 }
 public int getCharacterOffset() {
   Location loc = getLocation();
   if (loc != null) {
     return loc.getCharacterOffset();
   }
   return -1;
 }