Changeset 27054 for main/trunk/greenstone3
- Timestamp:
- 2013-03-12T13:18:01+13:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/DebugService.java
r27023 r27054 30 30 protected static final String RETRIEVE_TEMPLATE_FROM_XML_FILE = "RetrieveXMLTemplateFromFile"; 31 31 protected static final String SAVE_TEMPLATE_TO_XML_FILE = "SaveXMLTemplateToFile"; 32 protected static final String GET_GSLIB_ELEMENTS_FROM_FILE = "GetGSLIBElementsFromFile"; 32 protected static final String GET_GSLIB_ELEMENTS_FROM_FILE = "GetGSLIBElementsFromFile"; 33 33 /*********************************************************/ 34 34 … … 300 300 { 301 301 Element result = GSXML.createBasicResponse(this.doc, GET_GSLIB_ELEMENTS_FROM_FILE); 302 302 303 303 if (request == null) 304 304 { … … 309 309 String lang = request.getAttribute(GSXML.LANG_ATT); 310 310 String uid = request.getAttribute(GSXML.USER_ID_ATT); 311 311 312 312 // Get the parameters of the request 313 313 Element param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); … … 325 325 String filePath = GlobalProperties.getGSDL3Home() + File.separator + "interfaces" + File.separator + interfaceName + File.separator + "transform" + File.separator + "gslib.xsl"; 326 326 File xslFile = new File(filePath); 327 328 System.err.println("1 -> " + filePath); 329 if(xslFile.exists()) 330 { 331 System.err.println("2"); 327 328 if (xslFile.exists()) 329 { 332 330 XMLConverter converter = new XMLConverter(); 333 331 Document xslDoc = converter.getDOM(xslFile, "UTF-8"); … … 335 333 Element templateList = this.doc.createElement("templateList"); 336 334 String templateListString = "["; 337 335 338 336 NodeList templateElems = xslDoc.getElementsByTagNameNS(GSXML.XSL_NAMESPACE, "template"); 339 for (int i = 0; i < templateElems.getLength(); i++)340 { 341 Element currentElem = (Element) templateElems.item(i);342 if (currentElem.hasAttribute(GSXML.NAME_ATT))337 for (int i = 0; i < templateElems.getLength(); i++) 338 { 339 Element currentElem = (Element) templateElems.item(i); 340 if (currentElem.hasAttribute(GSXML.NAME_ATT)) 343 341 { 344 342 templateListString += "\"" + currentElem.getAttribute(GSXML.NAME_ATT) + "\""; 345 if (i < templateElems.getLength() - 1)343 if (i < templateElems.getLength() - 1) 346 344 { 347 345 templateListString += ","; … … 349 347 } 350 348 } 351 349 352 350 templateListString += "]"; 353 System.err.println("3 -> " + templateListString); 351 354 352 templateList.setTextContent(templateListString); 355 353 result.appendChild(templateList); 356 354 } 357 System.err.println("4"); 358 355 359 356 return result; 360 357 }
Note:
See TracChangeset
for help on using the changeset viewer.