Project

General

Profile

« Previous | Next » 

Revision 831

Added by bojilova over 22 years ago

small fix to enable resolving external entities included in the DTD;
external entities are now resolved successfully by DBEntityResolver using the specified system ids
and thus there no need of registering the relative system ids,
This is because EntityResolver uses its internal implementation to map the relative system ids to the
files on the current file system; for example external entity declared in the DTD as:
<!ENTITY % resource SYSTEM "./eml-resource.dtd">
is resolved to "file:///opt/tomcat/webapps/bojilova/dtd/eml-resource.dtd"
which is the right location of eml-resource.dtd file.

View differences:

src/edu/ucsb/nceas/metacat/DBSAXHandler.java
158 158
                            String qName, Attributes atts) 
159 159
               throws SAXException {
160 160
     MetaCatUtil.debugMessage("Start ELEMENT " + qName);
161
System.out.println("Start ELEMENT " + uri);
162
System.out.println("Start ELEMENT " + qName);
163
System.out.println("Start ELEMENT " + localName);
164 161
 
165 162
     DBSAXNode parentNode = null;
166 163
     DBSAXNode currentNode = null;
......
510 507
//                              + " " + systemId);
511 508
     MetaCatUtil.debugMessage("EXTERNENTITYDECL: " + name + " " + publicId 
512 509
                              + " " + systemId);
510
     // it processes other external entity, not the DTD;
511
     // it doesn't signal for the DTD here
512
     processingDTD = false;
513 513
   }
514 514

  
515 515
   //

Also available in: Unified diff