1 17 18 19 20 package org.apache.fop.image; 21 22 import org.w3c.dom.Document ; 24 import javax.xml.parsers.SAXParserFactory ; 25 26 32 public class XMLImage extends AbstractFopImage { 33 34 private Document doc; 35 private String namespace = ""; 36 37 40 public XMLImage(FopImage.ImageInfo imgInfo) { 41 super(imgInfo); 42 if (imgInfo.data instanceof Document ) { 43 doc = (Document )imgInfo.data; 44 loaded = loaded | ORIGINAL_DATA; 45 } 46 namespace = imgInfo.str; 47 } 48 49 54 public static String getParserName() { 55 try { 56 SAXParserFactory factory = SAXParserFactory.newInstance(); 57 return factory.newSAXParser().getXMLReader().getClass().getName(); 58 } catch (Exception e) { 59 return null; 60 } 61 } 62 63 67 public Document getDocument() { 68 return this.doc; 69 } 70 71 75 public String getNameSpace() { 76 return this.namespace; 77 } 78 } 79 | Popular Tags |