Package com.caucho.relaxng

Examples of com.caucho.relaxng.RelaxException


   */
  public void addNameChild(NameClassPattern child)
    throws RelaxException
  {
    if (_pattern != null)
      throw new RelaxException(L.l("<exclude> must have a single child."));

    _pattern = child;
  }
View Full Code Here


   */
  public void addChild(Pattern child)
    throws RelaxException
  {
    if (child instanceof DataPattern)
      throw new RelaxException(L.l("<data> or <string> may not be used with interleave.  Use <text> instead."));

    if (child instanceof EmptyPattern)
      throw new RelaxException(L.l("<empty> is not allowed as a child of <interleave>"));
   
    child.setParent(this);
    child.setElementName(getElementName());

    if (child instanceof InterleavePattern) {
View Full Code Here

   */
  public void addChild(Pattern child)
    throws RelaxException
  {
    if (_name == null)
      throw new RelaxException(L.l("<attribute> must have a <name> definition before any children."));
   
    child.setParent(_children);
    // XXX: (group always null?)
    // child.setElementName(_children.getElementName());

View Full Code Here

   */
  public void endElement()
    throws RelaxException
  {
    if (_name == null)
      throw new RelaxException(L.l("<attribute> must have a <name> definition."));
  }
View Full Code Here

  /**
   * Throws an error.
   */
  protected RelaxException error(String msg)
  {
    return new RelaxException(msg);
  }
View Full Code Here

  /**
   * Throws an error.
   */
  protected RelaxException error(String msg)
  {
    return new RelaxException(msg);
  }
View Full Code Here

  /**
   * Throws an error.
   */
  protected RelaxException error(String msg)
  {
    return new RelaxException(msg);
  }
View Full Code Here

  /**
   * Throws an error.
   */
  protected RelaxException error(String msg)
  {
    return new RelaxException(msg);
  }
View Full Code Here

   */
  public void setStart(Pattern start)
    throws RelaxException
  {
    if (_start != null)
      throw new RelaxException(L.l("Duplicate <start> in <grammar>.  The <grammar> element can only have one <start>."));

    _start = start;
  }
View Full Code Here

    throws RelaxException
  {
    if (! (parent instanceof NameClassPattern) &&
        ! (parent instanceof ElementPattern) &&
        ! (parent instanceof AttributePattern)) {
      throw new RelaxException(L.l("{0} is not allowed as a child of {1}",
                                   getTagName(), parent.getTagName()));
    }

    super.setParent(parent);
  }
View Full Code Here

TOP

Related Classes of com.caucho.relaxng.RelaxException

Copyright © 2018 www.massapicom. 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.