コード例 #1
0
  public void startSpecialElement(ElementType type, NodeAnnotation annotation) throws SAXException {

    consumer.foundContent();
    SpecialOpaqueElementStart opaqueAdaptor = new SpecialOpaqueElementStart(type, annotation);
    try {
      // Note: ASSUMES that special elements always have content.
      // We may live to regret this...
      output.startElement(opaqueAdaptor, true);
      output.startContent();
    } catch (WBSAXException e) {
      throw new ExtendedSAXException(e);
    }
  }
コード例 #2
0
 public void addSharedStringReference(int index) throws SAXException {
   // Note: paul's test case currently only supports string references
   // in content, so presumably this is supposed to add a string
   // reference to the content?
   try {
     //
     consumer.foundContent();
     // End any existing text node we have
     consumer.flushCharacters();
     // And create a new reference
     output.addContentValue(references.createReference(index));
   } catch (WBSAXException e) {
     throw new ExtendedSAXException(e);
   }
 }