- Timestamp:
- 02/03/2020 04:01:55 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 3 edited
-
incident_script.dtd (deleted)
-
src/scriptbuilder/gui/application.properties (modified) (1 diff)
-
src/scriptbuilder/structures/SimulationScript.java (modified) (1 diff)
-
src/scriptbuilder/structures/XMLBuilder.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/scriptbuilder/gui/application.properties
r201 r206 1 # Wed, 29 Jan 2020 05:08:10-08001 #Mon, 03 Feb 2020 16:55:57 -0800 2 2 3 Application.revision= 1983 Application.revision=205 4 4 5 Application.buildnumber=5 45 Application.buildnumber=55 6 6 7 7 Incidents.directory=Incidents -
trunk/src/scriptbuilder/structures/SimulationScript.java
r203 r206 353 353 354 354 } 355 356 357 } 355 } 356 358 357 @Override 359 358 public String toXML() 360 359 { 361 360 ArrayList<TimeSlice> slices = arrangeAllSlices(); 362 String output = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"; 363 output += XMLBuilder.externalDTD(); 361 String output = ""; 364 362 output += XMLBuilder.openTag(ELEMENT.TMC_SCRIPT.tag + " title=\"" + this.title + "\""); 365 363 -
trunk/src/scriptbuilder/structures/XMLBuilder.java
r205 r206 84 84 85 85 /** 86 * Generates the link to external DTD for XML script files. 87 * 88 * @return 86 * @return the xml string with the link to external DTD for XML script files. 89 87 */ 90 88 public static String externalDTD() 91 89 { 92 String output = ""; 93 output += "<!DOCTYPE TMC_SCRIPT SYSTEM \"incident_script.dtd\">\n"; 94 return output; 90 return "<!DOCTYPE TMC_SCRIPT SYSTEM \"incident_script.dtd\">\n"; 95 91 } 96 92 /** 93 * @return The xml string that starts the document. 94 */ 95 public static String xmlHeader() 96 { 97 return "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"; 98 } 97 99 /** 98 100 * Prettyprint an XML string. … … 111 113 e.printStackTrace(); 112 114 } 115 // Prepend the header and externalDTD lines. (This must be done after 116 // prettyprinting, which tries to read the externalDTD if the link is present.) 117 // Fixes #239. 118 formattedXML = xmlHeader() + externalDTD() + formattedXML; 113 119 return formattedXML; 114 120 }
Note: See TracChangeset
for help on using the changeset viewer.
