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

   * Adds a name child.
   */
  public void addNameChild(NameClassPattern child)
    throws RelaxException
  {
    throw new RelaxException(L.l("<{0}> is not an allowed child for <{1}>.",
                                 child.getTagName(), getTagName()));
  }
View Full Code Here

   * Adds an element child.
   */
  public void addChild(Pattern child)
    throws RelaxException
  {
    throw new RelaxException(L.l("<{0}> is not an allowed child for <{1}>.",
                                 child.getTagName(), getTagName()));
  }
View Full Code Here

   * Creates the current state
   */
  public Item createItem(GrammarPattern grammar)
    throws RelaxException
  {
    throw new RelaxException(L.l("item isn't allowed in `{0}'.",
                                 getClass().getName()));
  }
View Full Code Here

   * Creates the name program
   */
  public NameClassItem createNameItem()
    throws RelaxException
  {
    throw new RelaxException(L.l("name-item isn't allowed in `{0}'.",
                                 getClass().getName()));
  }
View Full Code Here

  public RelaxException error(String msg)
  {
    String location = getLocation();

    if (location != null)
      return new RelaxException(location + ": " + msg);
    else
      return new RelaxException(msg);
  }
View Full Code Here

      else if (_patterns.get(i).hasElement())
        hasElement = true;
    }

    if (hasData && hasElement)
      throw new RelaxException(L.l("<data> may not be in a <group>.  Use <text> instead."));
  }
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.