41 */ 42 final class MTOMDecorator implements XmlVisitor { 43 44 private final XmlVisitor next; 45 46 private final AttachmentUnmarshaller au; 47 48 private UnmarshallerImpl parent; 49 50 private final Base64Data base64data = new Base64Data(); 51 52 /** 53 * True if we are between the start and the end of xop:Include 54 */ 55 private boolean inXopInclude; 56 57 /** 58 * UGLY HACK: we need to ignore the whitespace that follows 59 * the attached base64 image. 60 * 61 * This happens twice; once before </xop:Include>, another 62 * after </xop:Include>. The spec guarantees that 63 * no valid pcdata can follow </xop:Include>. 64 */ 65 private boolean followXop; 66 67 public MTOMDecorator(UnmarshallerImpl parent,XmlVisitor next, AttachmentUnmarshaller au) { 68 this.parent = parent; 69 this.next = next; 70 this.au = au; 71 } 72 73 public void startDocument(LocatorEx loc, NamespaceContext nsContext) throws SAXException { 74 next.startDocument(loc,nsContext); 75 } 76 77 public void endDocument() throws SAXException { 78 next.endDocument(); 79 } 80 81 public void startElement(TagName tagName) throws SAXException { 82 if(tagName.local.equals("Include") && tagName.uri.equals(WellKnownNamespace.XOP)) { 83 // found xop:Include | 41 */ 42 final class MTOMDecorator implements XmlVisitor { 43 44 private final XmlVisitor next; 45 46 private final AttachmentUnmarshaller au; 47 48 private UnmarshallerImpl parent; 49 50 private final Base64Data base64data = new Base64Data(); 51 52 /** 53 * True if we are between the start and the end of xop:Include 54 */ 55 private boolean inXopInclude; 56 57 /** 58 * UGLY HACK: we need to ignore the whitespace that follows 59 * the attached base64 image. 60 * 61 * This happens twice; once before {@code </xop:Include>}, another 62 * after {@code </xop:Include>}. The spec guarantees that 63 * no valid pcdata can follow {@code </xop:Include>}. 64 */ 65 private boolean followXop; 66 67 public MTOMDecorator(UnmarshallerImpl parent,XmlVisitor next, AttachmentUnmarshaller au) { 68 this.parent = parent; 69 this.next = next; 70 this.au = au; 71 } 72 73 public void startDocument(LocatorEx loc, NamespaceContext nsContext) throws SAXException { 74 next.startDocument(loc,nsContext); 75 } 76 77 public void endDocument() throws SAXException { 78 next.endDocument(); 79 } 80 81 public void startElement(TagName tagName) throws SAXException { 82 if(tagName.local.equals("Include") && tagName.uri.equals(WellKnownNamespace.XOP)) { 83 // found xop:Include |