Applying XSLT to the Search_results.XML

19 views
Skip to first unread message

Swami Watson

unread,
May 26, 2012, 8:54:20 PM5/26/12
to Google-Search-...@googlegroups.com

Can someone tell me how to do this. I have attached two files. one is a XSLT (gsa-xhtml.en.xslt) and the other is search_results.xml     I got the XML returned from a Google Mini. I want to take this XML and apply the gsa-xhtml.en.xslt to it.  I want to do it in a browser first and then on a server. Apache/Xerces/xalan server. 

I can't even view the XML when I apply the XSLT. in a browser. What am I doing wrong.  

Watson.
search_results.xml
gsa-xhtml.en.xslt

Dave Watts

unread,
May 26, 2012, 11:17:48 PM5/26/12
to google-search-...@googlegroups.com
I'm not sure what you're doing when you apply the XSLT in the browser,
but there are a couple of ways you can do it. You can add an element
to your XML file, as described here:

http://www.tonymarston.net/php-mysql/client-side-xslt.html

Or, you can do it via JavaScript, as described here:

http://www.w3schools.com/xsl/xsl_client.asp

In actuality, of course, XSL transformations with the appliance will
be server-side, not client-side, so you should probably configure your
test server with something like this:

http://www.mod-xslt2.com/

You could use Xalan via servlets, but I don't know if there's another
way to set that up.

Finally, you don't even really need a server at all for this - there
are several XML-aware text editors that can perform XSL
transformations for you, right in the editor/IDE.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.
Reply all
Reply to author
Forward
0 new messages