Changeset 24425 for main/trunk
- Timestamp:
- 2011-08-18T20:00:27+12:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/cdm/CollectionConfigXMLReadWrite.java
r24367 r24425 561 561 format_element.setAttribute (StaticStrings.NAME_ATTRIBUTE, name_str); 562 562 } 563 if (format != null) { 563 564 // Don't write out an empty format statement of <format/> (i.e. format has no child nodes) 565 // as this will end up embedded in another format statement as <format><format/><format /> 566 // This doubling up of format stmts will then prevent GLI from opening the collection again. 567 if (format != null && format.hasChildNodes()) { // not an empty format statement 564 568 String gsf_text = XMLTools.xmlNodeToStringWithoutIndenting(format); 565 569 566 570 if (gsf_text.startsWith("<") && (gsf_text.indexOf("<") != gsf_text.lastIndexOf("<"))) { 567 571 gsf_text = gsf_text.substring(gsf_text.indexOf("<gsf"), 568 572 gsf_text.indexOf(StaticStrings.FORMAT_END_TAG)); 569 573 } 570 574 571 575 XMLTools.setNodeText(format_element, gsf_text); 572 576 }
Note:
See TracChangeset
for help on using the changeset viewer.