1 5 package xdoclet.tagshandler; 6 7 import xdoclet.XDocletException; 8 import xdoclet.XDocletMessages; 9 import xdoclet.XDocletTagSupport; 10 import xdoclet.XmlSubTask; 11 import xdoclet.util.Translator; 12 13 21 public class XmlTagsHandler extends XDocletTagSupport 22 { 23 31 public String publicId() throws XDocletException 32 { 33 try { 34 XmlSubTask subTask = (XmlSubTask) getDocletContext().getActiveSubTask(); 35 36 return subTask.getPublicId(); 37 } 38 catch (ClassCastException ex) { 39 throw new XDocletException(ex, Translator.getString(XDocletMessages.class, XDocletMessages.NO_XML_TAGS_ALLOWED)); 40 } 41 } 42 43 44 52 public String systemId() throws XDocletException 53 { 54 try { 55 XmlSubTask subTask = (XmlSubTask) getDocletContext().getActiveSubTask(); 56 57 return subTask.getSystemId(); 58 } 59 catch (ClassCastException ex) { 60 throw new XDocletException(ex, Translator.getString(XDocletMessages.class, XDocletMessages.NO_XML_TAGS_ALLOWED)); 61 } 62 } 63 64 65 73 public String schema() throws XDocletException 74 { 75 try { 76 XmlSubTask subTask = (XmlSubTask) getDocletContext().getActiveSubTask(); 77 78 return subTask.getSchema(); 79 } 80 catch (ClassCastException ex) { 81 throw new XDocletException(ex, Translator.getString(XDocletMessages.class, XDocletMessages.NO_XML_TAGS_ALLOWED)); 82 } 83 } 84 } 85 | Popular Tags |