public void startElement(TagName tagName) throws SAXException {
   attributes.setAttributes(tagName.atts);
   tagName.atts = attributes;
   tagName.uri = intern(tagName.uri);
   tagName.local = intern(tagName.local);
   next.startElement(tagName);
 }
Exemplo n.º 2
0
 public void startElement(TagName tagName) throws SAXException {
   if (tagName.local.equals("Include") && tagName.uri.equals(WellKnownNamespace.XOP)) {
     // found xop:Include
     String href = tagName.atts.getValue("href");
     DataHandler attachment = au.getAttachmentAsDataHandler(href);
     if (attachment == null) {
       // report an error and ignore
       parent.getEventHandler().handleEvent(null);
       // TODO
     }
     base64data.set(attachment);
     next.text(base64data);
     inXopInclude = true;
     followXop = true;
   } else next.startElement(tagName);
 }
Exemplo n.º 3
0
  public void startElement(String uri, String local, String qname, Attributes atts)
      throws SAXException {
    // work gracefully with misconfigured parsers that don't support namespaces
    if (uri == null || uri.length() == 0) uri = "";
    if (local == null || local.length() == 0) local = qname;
    if (qname == null || qname.length() == 0) qname = local;

    boolean ignorable = true;
    StructureLoader sl;

    // not null only if element content is processed (StructureLoader is used)
    // ugly
    if ((sl = this.context.getStructureLoader()) != null) {
      ignorable = ((ClassBeanInfoImpl) sl.getBeanInfo()).hasElementOnlyContentModel();
    }

    processText(ignorable);

    tagName.uri = uri;
    tagName.local = local;
    tagName.qname = qname;
    tagName.atts = atts;
    next.startElement(tagName);
  }