Changeset 23405 for main/trunk/greenstone3/web/interfaces/oran
- Timestamp:
- 2010-12-07T17:05:38+13:00 (13 years ago)
- Location:
- main/trunk/greenstone3/web/interfaces/oran
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/oran/interfaceConfig.xml
r23360 r23405 22 22 <action name='s' class='SystemAction' xslt='system.xsl'/> 23 23 24 <action name='f' class='FormatAction' xslt='formatString.xsl'/>24 <action name='f' class='FormatAction'/> <!-- xslt='formatString.xsl'/> --> 25 25 26 26 <action name='g' class='GeneralAction'> -
main/trunk/greenstone3/web/interfaces/oran/js/gui_div.js
r23360 r23405 11 11 //console.log(formatStatement); 12 12 13 // find collection name 14 15 var myurl = document.URL; 16 console.log(myurl); 17 var first = myurl.indexOf("&c")+3; 18 var last = myurl.indexOf("&", first); 19 20 var collection_name = myurl.substring(first,last); ///&c=(.*)&/.exec(myurl); 21 console.log(collection_name); 22 23 first = myurl.indexOf("&s")+3; 24 last = myurl.indexOf("&", first); 25 26 var service_name = myurl.substring(first,last); 27 console.log(service_name); 28 29 var classifier_name = null; 30 31 if(service_name == "ClassifierBrowse") 32 { 33 first = myurl.indexOf("&cl")+4; 34 last = myurl.indexOf("&", first); 35 36 classifier_name = myurl.substring(first,last); 37 console.log(classifier_name); 38 } 13 39 14 40 //var myurl = 'http://localhost:8080/greenstone3/format?a=s&sa=s&t='+formatStatement; … … 17 43 18 44 // How do I find out my collection name? 19 20 $.post("http://localhost:8080/greenstone3/format?a=f", {data: formatStatement}, function(data) { 45 var post_url = "http://localhost:8080/greenstone3/format?a=f&c=" + collection_name +"&s=" + service_name; 46 47 if(classifier_name != null) 48 post_url = post_url + "&cl=" + classifier_name; 49 50 $.post(post_url, {data: formatStatement}, function(data) { 21 51 //$('.result').innerHTML = data; //html(data); 22 52 console.log("Success, we have received data"); -
main/trunk/greenstone3/web/interfaces/oran/transform/formatString.xsl
r23360 r23405 1 <?xml version="1.0" encoding=" ISO-8859-1"?>1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <xsl:stylesheet version="1.0" 3 3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 4 xmlns:java="http://xml.apache.org/xslt/java" 5 extension-element-prefixes="java"> 4 xmlns:xslt="http://www.w3.org/1999/XSL/Transform" 5 xmlns:gslib="http://www.greenstone.org/XSL/Library" 6 xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" 7 xmlns:util="http://org.greenstone.gsdl3.util.XSLTUtil" 8 exclude-result-prefixes="util gslib gsf xslt"> 9 10 <!-- extension-element-prefixes="java"> --> 6 11 7 12 <xsl:strip-space elements="*"/> … … 241 246 <!-- Main page generation --> 242 247 243 <xsl:template match=" page">244 < html>248 <xsl:template match="/"> 249 <!-- <html> 245 250 <head> 246 251 <title> … … 249 254 </head> 250 255 <body> 251 <h2> This should be the format string (unmodified and html version) </h2> 256 <h2> This should be the format string (unmodified and html version) </h2> --> 252 257 <!-- <xsl:value-of select="/page/pageResponse" disable-output-escaping="yes"/> --> 253 258 <xsl:call-template name="xml"> 254 <xsl:with-param name="fmt" select=" /page/pageResponse"/>259 <xsl:with-param name="fmt" select="."/> 255 260 </xsl:call-template><xsl:text> </xsl:text> 256 261 <!-- <xsl:apply-templates select="/page/pageResponse" mode="xml"/> --> 257 </body> 258 </html> 259 </xsl:template> 260 262 <!-- </body> 263 </html> --> 264 </xsl:template> 265 266 <!-- 261 267 <xsl:template name="pageTitle"> 262 268 <xsl:value-of select="java:org.greenstone.gsdl3.util.XSLTUtil.getInterfaceText($interface_name, /page/@lang, 'gsdl')"/> 263 </xsl:template> 269 </xsl:template> --> 264 270 265 271 </xsl:stylesheet>
Note:
See TracChangeset
for help on using the changeset viewer.