Examples of XMLValidationException


Examples of dk.brics.xact.XMLValidationException

        i = n.getIndex();
        break;
      }
    }
    if (t == null)
      throw new XMLValidationException("No schema found for type " + type, origin);
    LocalValidationErrorHandler handler = new LocalValidationErrorHandler();
    new Validator(handler).validate(xg, t, i);
    if (!handler.errors.isEmpty()) {
      XMLValidationException ex = null;
      while (!handler.errors.isEmpty()) {
        XMLValidationException e = handler.errors.pop();
        e.setNext(ex);
        ex = e;
      }
      throw ex;
    }
  }
View Full Code Here

Examples of dk.brics.xact.XMLValidationException

    if (ns == null && map2 != null)
      ns = map2.get(prefix);
    if (ns == null && prefix.length() == 0)
      ns = "";
    if (ns == null)
      throw new XMLValidationException("Undeclared namespace prefix " + prefix, origin);
    if (ns.length() == 0)
      return localname;
    else
      return "{" + ns + "}" + localname;
  }
View Full Code Here

Examples of dk.brics.xact.XMLValidationException

        b.append(" at root");
        or = origin;
      }
      if (example != null)
        b.append(": ").append(example.length() > 0 ? example : "[empty contents]");
      errors.push(new XMLValidationException(b.toString(), or));
      return true;
    }
View Full Code Here

Examples of dk.brics.xact.XMLValidationException

        i = n.getIndex();
        break;
      }
    }
    if (t == null)
      throw new XMLValidationException("No schema found for type " + type, origin);
    LocalValidationErrorHandler handler = new LocalValidationErrorHandler();
    new Validator(handler).validate(xg, t, i);
    if (!handler.errors.isEmpty()) {
      XMLValidationException ex = null;
      while (!handler.errors.isEmpty()) {
        XMLValidationException e = handler.errors.pop();
        e.setNext(ex);
        ex = e;
      }
      throw ex;
    }
  }
View Full Code Here

Examples of dk.brics.xact.XMLValidationException

    if (ns == null && map2 != null)
      ns = map2.get(prefix);
    if (ns == null && prefix.length() == 0)
      ns = "";
    if (ns == null)
      throw new XMLValidationException("Undeclared namespace prefix " + prefix, origin);
    if (ns.length() == 0)
      return localname;
    else
      return "{" + ns + "}" + localname;
  }
View Full Code Here

Examples of dk.brics.xact.XMLValidationException

        b.append(" at root");
        or = origin;
      }
      if (example != null)
        b.append(": ").append(example.length() > 0 ? example : "[empty contents]");
      errors.push(new XMLValidationException(b.toString(), or));
      return true;
    }
View Full Code Here

Examples of dk.brics.xact.XMLValidationException

 
  public Automaton getAutomatonFromStringExp(ValueBox b, Origin origin) {
    if (b.getValue().getType() instanceof NullType)
      return Automaton.makeString("null");
    if (!TranslatorContext.isStringType(b))
      throw new XMLValidationException("String expression expected " + b, origin);
    return sa.getAutomaton(b);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.