Revision 1442
Added by Jing Tao over 21 years ago
SchemaLocationResolver.java | ||
---|---|---|
60 | 60 |
// in external property in parser |
61 | 61 |
//private String schemaFileName = null; |
62 | 62 |
// constant |
63 |
private String SCHEMATYPE ="Schema"; |
|
63 |
//private String SCHEMATYPE ="Schema";
|
|
64 | 64 |
private String WHITESPACESTRING =" "; |
65 | 65 |
|
66 | 66 |
public SchemaLocationResolver() |
... | ... | |
135 | 135 |
PreparedStatement pstmt = null; |
136 | 136 |
ResultSet result = null; |
137 | 137 |
String sql = "SELECT public_id, system_id FROM xml_catalog where " + |
138 |
"entry_type ='" + SCHEMATYPE +"'";
|
|
138 |
"entry_type ='" + DocumentImpl.SCHEMA +"'";
|
|
139 | 139 |
try |
140 | 140 |
{ |
141 | 141 |
//check out DBConnection |
... | ... | |
205 | 205 |
PreparedStatement pstmt = null; |
206 | 206 |
ResultSet result = null; |
207 | 207 |
String sql = "SELECT public_id FROM xml_catalog where " + |
208 |
"entry_type ='" + SCHEMATYPE +"'";
|
|
208 |
"entry_type ='" + DocumentImpl.SCHEMA +"'";
|
|
209 | 209 |
try |
210 | 210 |
{ |
211 | 211 |
//check out DBConnection |
... | ... | |
345 | 345 |
PreparedStatement pstmt = null; |
346 | 346 |
String sql = "INSERT INTO xml_catalog " + |
347 | 347 |
"(entry_type, public_id, system_id) " + |
348 |
"VALUES ('" + SCHEMATYPE + "', ?, ?)";
|
|
348 |
"VALUES ('" + DocumentImpl.SCHEMA + "', ?, ?)";
|
|
349 | 349 |
|
350 | 350 |
|
351 | 351 |
try |
... | ... | |
424 | 424 |
schema2.resolveNameSpace(); |
425 | 425 |
// input a wrong name space location |
426 | 426 |
SchemaLocationResolver schema3 = new SchemaLocationResolver( |
427 |
"http://www.xml-cml.org/schema/stmml " +
|
|
427 |
"http://www.xm.org/schema/stmml " + |
|
428 | 428 |
"http://dev.nceas.ucsb.edu/tao/schema/stmml.xsd"); |
429 | 429 |
schema3.resolveNameSpace(); |
430 | 430 |
// print out new schema list in db |
Also available in: Unified diff
Using the contant in documentImpl rather using itself.