How to get page source in xslt code

0 views
Skip to first unread message

永华 韦

unread,
Nov 5, 2009, 7:57:25 AM11/5/09
to Google Search Appliance/Google Mini - Google Search Appliance/Google Mini
I have a issue when customize GSA search result title. I want to use a
value which store in a tag such as<p>ValueUsedForTitle</p>. when I
view page source, I can find it in somewhere. But in xslt code(it
located in Google Search Appliance >Serving >Front Ends >Output
Format), how do I get the value? I saw default xslt code, and can get
page title by <xsl:value-of select="T"/>, it seems that T stand for
page title,right? But how to get page content? One more, I can see the
<p>ValueUsedForTitle</p> in page source, but when search
"ValueUsedForTitle", it doesn't include in search result.

JMarkham

unread,
Nov 5, 2009, 2:44:10 PM11/5/09
to Google Search Appliance/Google Mini - Google Search Appliance/Google Mini
Hi,

The <xsl:value-of select="T"/> element in the result XML comes from
the <title> element on your page (or title attribute of a Word doc,
etc.). To change this, you can change your page title.

To more finely control this, you would want to customize your XSLT,
and add a <META> tag to your page that contains the value for title
you would like to display. Then, add "&getfields=*" to your query URL
string, so you get all the metadata elements back, then substitute
something like <xsl:value-of select="MT/@name='title'"/> for
<xsl:value-of select="T"/> in your XSLT.

Hope that helps,

Jeff
Reply all
Reply to author
Forward
0 new messages