Esempio n. 1
0
  /**
   * Translate this element and all contained elements into SAX events. The events should be routed
   * to the contentHandler found in the WingContext.
   *
   * @param contentHandler (Required) The registered contentHandler where SAX events should be
   *     routed too.
   * @param lexicalHandler (Required) The registered lexicalHandler where lexical events (such as
   *     CDATA, DTD, etc) should be routed too.
   * @param namespaces (Required) SAX Helper class to keep track of namespaces able to determine the
   *     correct prefix for a given namespace URI.
   */
  public void toSAX(
      ContentHandler contentHandler, LexicalHandler lexicalHandler, NamespaceSupport namespaces)
      throws SAXException {
    AttributeMap attributes = new AttributeMap();
    attributes.put(A_RETURN_VALUE, this.returnValue);

    startElement(contentHandler, namespaces, E_OPTION, attributes);
    super.toSAX(contentHandler, lexicalHandler, namespaces);
    endElement(contentHandler, namespaces, E_OPTION);
  }
Esempio n. 2
0
  /**
   * Translate into SAX events.
   *
   * @param contentHandler (Required) The registered contentHandler where SAX events should be
   *     routed too.
   * @param lexicalHandler (Required) The registered lexicalHandler where lexical events (such as
   *     CDATA, DTD, etc) should be routed too.
   * @param namespaces (Required) SAX Helper class to keep track of namespaces able to determine the
   *     correct prefix for a given namespace URI.
   */
  public void toSAX(
      ContentHandler contentHandler, LexicalHandler lexicalHandler, NamespaceSupport namespaces)
      throws SAXException {
    AttributeMap attributes = new AttributeMap();
    if (this.target != null) attributes.put(A_TARGET, target);
    if (this.rend != null) attributes.put(A_RENDER, rend);

    startElement(contentHandler, namespaces, E_TRAIL, attributes);
    super.toSAX(contentHandler, lexicalHandler, namespaces);
    endElement(contentHandler, namespaces, E_TRAIL);
  }