Clear search
Close search
Google apps
Main menu

Off board XSLT transformation for GSA front ends

When customizing/developing a GSA XSLT frontend it can be beneficial to perform testing of XSLT logic and the resulting HTML offboard to speed up the iteration.
1) Download XSLT 2.0 processor, in this example we will use Saxon
Current version is
Extract the downloaded zip contents to a separate folder.
Step1 Saxon unzipped
2) Extract frontend XSLT to a separate file (e.g. defaultfrontend.xslt)
  • Go to admin console section Search > Search Features > Front Ends
  • Edit the front end needed
Step2 Edit GSA front end
  • Select Edit underlying XSLT code withing the opened dialog and copy paste all the contents to newly created xslt file defaultfrontend.xslt, if the front end was not modified before.
  • Copy paste all the contents of the Raw XSLT Code frame into newly created file defaultfrontend.xsltfor the front end being modified before. 
Step2 Save xslt
3) Export current GSA Configuration at "http://yourgsaIP:8000/EnterpriseController#a=importExport".
Step3 Export GSA configuration
4) Open exported config.xml file and extract following embedded XSL files
  •  customer-onebox.xsl
    Get the content copied to a file between '<file Name="customer-onebox.xsl"><![CDATA[' and ']]></file>'.
Step4 Embedded xsl
  • expertsearch.xsl
  • testconfig.xsl
5) Download results from GSA in XML format and save them to a file - (e.g. results.xml). To retrieve XML results, remove the proxystylesheet parameter from the search URL.
Step5 xml results
6) To perform the XSLT transformation run the following command:
java -jar Saxonfolder/saxon9he.jar -xsl:defaultfrontend.xslt -s:results.xml -o:output.html
You would have a warning during the xslt transformation process in case you are missing one of the files to be placed at the same folder as original frontend xslt:
Example output in Unix:
 java -jar Saxonfolder/saxon9he.jar -xsl:defaultfrontend.xslt -s:results.xml -o:output.htmlError on line 110 column 39 of defaultfrontend.xslt:
  XTSE0165: I/O error reported by XML parser processing
  /usr/local/home/.../expertsearch.xsl (No such file or directory)
I/O error reported by XML parser processing file:/usr/local/home/.../expertsearch.xsl: /usr/local/home/.../expertsearch.xsl (No such file or directory)
Otherwise the output.html file would be generated based on xslt instructions developed by you.
Was this article helpful?
How can we improve it?