Project

General

Profile

« Previous | Next » 

Revision 9972

Added by Jing Tao over 8 years ago

Fixed a bug that the public id can't be assigned.

View differences:

src/edu/ucsb/nceas/metacat/DBEntityResolver.java
104 104

  
105 105
    // Won't have a handler under all cases
106 106
    if ( handler != null ) {
107
        logMetacat.debug("DBEntityResolver.resolveEntity - the handler class is "+handler.getClass().getCanonicalName());
107 108
      if ( handler instanceof DBSAXHandler ) {
108 109
        DBSAXHandler dhandler = null;
109 110
        dhandler = (DBSAXHandler)handler;
110 111
        if ( dhandler.processingDTD() ) {
111
         
112
            logMetacat.debug("DBEntityResolver.resolveEntity - in the branch of the handler class is  DBSAXHandler");
112 113
          // public ID is doctype
113 114
          if (publicId != null) {
114 115
            doctype = publicId;
......
122 123
          }
123 124
        }
124 125
      } else if ( handler instanceof AccessControlList ) {
126
          logMetacat.debug("DBEntityResolver.resolveEntity - in the branch of the handler class is AccessControlList");
125 127
        AccessControlList ahandler = null;
126 128
        ahandler = (AccessControlList)handler;
127
        if ( ahandler.processingDTD() ) {
129
        //if ( ahandler.processingDTD() ) {
128 130
          // public ID is doctype
129 131
          if (publicId != null) {
130 132
            doctype = publicId;
......
132 134
          } else {
133 135
            doctype = ahandler.getDocname();
134 136
          }
135
        }
137
        //}
138
      } else {
139
          logMetacat.debug("DBEntityResolver.resolveEntity - in the branch of the other handler class");
140
          doctype = publicId;
136 141
      }
137 142
    } else {
138 143
        logMetacat.debug("DBEntityResolver.resolveEntity - the xml handler is null. So we can't find the doctype.");

Also available in: Unified diff