Changeset 23336 for main/trunk/greenstone3
- Timestamp:
- 2010-11-22T17:32:16+13:00 (13 years ago)
- Location:
- main/trunk/greenstone3
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/SystemAction.java
r23333 r23336 17 17 import javax.xml.parsers.DocumentBuilder; 18 18 import javax.xml.parsers.DocumentBuilderFactory; 19 20 import java.io.PrintWriter; 21 import java.io.StringWriter; 19 22 20 23 import org.apache.log4j.*; … … 75 78 DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); 76 79 DocumentBuilder builder = factory.newDocumentBuilder(); 77 InputSource is = new InputSource( new StringReader( format_string ) ); 80 String input = "<html><head><title></title></head><body>" + format_string + "</body></html>"; 81 InputSource is = new InputSource( new StringReader( input ) ); 78 82 Document d = builder.parse( is ); 79 83 page_response.appendChild(d); … … 81 85 catch( Exception ex ) { 82 86 logger.error("There was an exception "+ex); 87 88 StringWriter sw = new StringWriter(); 89 PrintWriter pw = new PrintWriter(sw, true); 90 ex.printStackTrace(pw); 91 pw.flush(); 92 sw.flush(); 93 logger.error(sw.toString()); 83 94 } 84 95 -
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/TransformingReceptionist.java
r23312 r23336 548 548 String publicID = "-//W3C//DTD HTML 4.01 Transitional//EN"; 549 549 String systemID = "http://www.w3.org/TR/html4/loose.dtd"; 550 550 551 551 // Try to get the system and public ID from the current skin xsl document 552 552 // otherwise keep the default values. -
main/trunk/greenstone3/web/interfaces/default/transform/classifier.xsl
r22569 r23336 61 61 </xsl:call-template> 62 62 63 <!-- Sam's div code -->64 65 <!-- <xsl:if test="/page/pageRequest[@name='output']='debug'"> -->66 67 <xsl:variable name="fmt">68 <xsl:call-template name="xml-to-string">69 <xsl:with-param name="node-set" select="//format[@type='browse']"/>70 </xsl:call-template>71 </xsl:variable>72 73 <!-- <xsl:variable name="tok" select="fn:tokenize($fmt,'/s+')"/> -->74 75 <div id="format">76 <p>77 <b>Format string here</b>78 <i>79 <xsl:value-of select="$fmt"/>80 <!-- <xsl:value-of select="$tok"/> -->81 </i>82 </p>83 </div>84 <!-- </xsl:if> -->85 86 87 63 <div id="content"> 88 64 <xsl:apply-templates select="service/classifierList"> -
main/trunk/greenstone3/web/interfaces/default/transform/util.xsl
r22569 r23336 11 11 <xsl:param name="library_name"/> 12 12 13 <xsl:include href="xml-to-string.xsl"/>14 15 13 <!-- every pages ................................................. --> 16 14 -
main/trunk/greenstone3/web/interfaces/oran/js/gui_div.js
r23333 r23336 7 7 { 8 8 9 var formatStatement = document.getElementById('formatStatement').innerHTML; 10 //console.log(formatStatement); 9 var formatDiv = document.getElementById('formatStatement'); 10 var formatStatement = innerXHTML(formatDiv); 11 console.log(formatStatement); 12 11 13 12 14 //var myurl = 'http://localhost:8080/greenstone3/format?a=s&sa=s&t='+formatStatement; … … 15 17 16 18 $.post("http://localhost:8080/greenstone3/format?a=s&sa=s", {data: formatStatement}, function(data) { 17 $('.result').innerHTML = data; //html(data);19 //$('.result').innerHTML = data; //html(data); 18 20 console.log("Success, we have received data"); 19 21 console.log(data); -
main/trunk/greenstone3/web/interfaces/oran/transform/layouts/main.xsl
r23333 r23336 2 2 <xsl:stylesheet version="1.0" 3 3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 4 4 5 xmlns:java="http://xml.apache.org/xslt/java" 5 6 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil" … … 23 24 24 25 <!-- the output format for this layout is html --> 25 <xsl:output method="html" omit-xml-declaration="yes"/> 26 <!-- <xsl:output method="xml" version="1.0" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" indent="yes" omit-xml-declaration="yes"/> --> 27 <xsl:output method="html" omit-xml-declaration="yes"/> 26 28 27 29 <!-- the main layout is defined here --> … … 130 132 <!-- Sam2's div code --> 131 133 134 <script type="text/javascript" src="interfaces/oran/js/innerxhtml.js"><xsl:text> </xsl:text></script> 132 135 <script type="text/javascript" src="interfaces/oran/js/gui_div.js"><xsl:text> </xsl:text></script> 133 136 … … 177 180 178 181 <div id="formatStatement"> 179 182 <div id="formatRoot"> 183 180 184 <xsl:call-template name="xml-to-gui"> 181 185 <xsl:with-param name="node-set" select="//format"/> <!-- [@type='browse']"/> --> 182 186 <xsl:with-param name="metadataSets" select="//metadataSetList"/> 183 187 </xsl:call-template> 184 188 </div> 185 189 </div> 186 190 </td> -
main/trunk/greenstone3/web/interfaces/oran/transform/layouts/xml-to-gui.xsl
r23333 r23336 196 196 <xsl:choose> 197 197 <xsl:when test="@type='document'"> 198 <option value = "document" selected = " document">Document</option>198 <option value = "document" selected = "selected">Document</option> 199 199 <option value = "classifier">Classifier</option> 200 200 <option value = "source">Source</option> 201 201 </xsl:when> 202 202 <xsl:when test="@type='classifier'"> 203 <option value = "classifier" selected = " classifier">Classifier</option>203 <option value = "classifier" selected = "selected">Classifier</option> 204 204 <option value = "document">Document</option> 205 205 <option value = "source">Source</option> 206 206 </xsl:when> 207 207 <xsl:when test="@type='source'"> 208 <option value = "source" selected = "s ource">Source</option>208 <option value = "source" selected = "selected">Source</option> 209 209 <option value ="document">Document</option> 210 210 <option value ="classifier">Classifier</option> 211 211 </xsl:when> 212 212 <xsl:when test="@type='horizontal'"> 213 <option value = "horizontal" selected = " horizontal">Horizontal</option>214 <option value = "source" selected = "source">Source</option>213 <option value = "horizontal" selected = "selected">Horizontal</option> 214 <option value = "source">Source</option> 215 215 <option value ="document">Document</option> 216 216 <option value ="classifier">Classifier</option> … … 236 236 <xsl:variable name="mode"> 237 237 <xsl:choose> 238 <xsl:when test="not(@mode)">MODE=<input class="mode" type="text" name="rawtextinput" size="10" value="vertical">< /input></xsl:when>239 <xsl:otherwise>MODE=<input class="mode" type="text" name="rawtextinput" size="10" value="{@mode}" ></input></xsl:otherwise>238 <xsl:when test="not(@mode)">MODE=<input class="mode" type="text" name="rawtextinput" size="10" value="vertical"><xsl:text></xsl:text></input></xsl:when> 239 <xsl:otherwise>MODE=<input class="mode" type="text" name="rawtextinput" size="10" value="{@mode}"/></xsl:otherwise> 240 240 </xsl:choose> 241 241 </xsl:variable> 242 242 243 <table class="header"><tbody><tr><td class="header">MATCH=<input class="match" type="text" name="rawtextinput" size="10" value="{@match}" ></input></td><td class="header"><xsl:copy-of select="$mode"/></td><td class="header"><a href="#" class="minmax ui-icon ui-icon-plusthick" title="Click me to expand">[+]</a></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table>243 <table class="header"><tbody><tr><td class="header">MATCH=<input class="match" type="text" name="rawtextinput" size="10" value="{@match}"/></td><td class="header"><xsl:copy-of select="$mode"/></td><td class="header"><a href="#" class="minmax ui-icon ui-icon-plusthick" title="Click me to expand">[+]</a></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table> 244 244 245 245 <table class="table" border="1"> … … 254 254 </tbody> 255 255 </table> 256 </div> <br/>256 </div> 257 257 </xsl:template> 258 258 … … 312 312 <xsl:choose> 313 313 <xsl:when test="@type='document'"> 314 <option value = "document" selected = " document">Document</option>314 <option value = "document" selected = "selected">Document</option> 315 315 <option value = "classifier">Classifier</option> 316 316 <option value = "source">Source</option> 317 317 </xsl:when> 318 318 <xsl:when test="@type='classifier'"> 319 <option value = "classifier" selected = " classifier">Classifier</option>319 <option value = "classifier" selected = "selected">Classifier</option> 320 320 <option value = "document">Document</option> 321 321 <option value = "source">Source</option> 322 322 </xsl:when> 323 323 <xsl:when test="@type='source'"> 324 <option value = "source" selected = "s ource">Source</option>324 <option value = "source" selected = "selected">Source</option> 325 325 <option value ="document">Document</option> 326 326 <option value ="classifier">Classifier</option>
Note:
See TracChangeset
for help on using the changeset viewer.