<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Search Nuggets &#187; webpart</title>
	<atom:link href="http://blog.comperiosearch.com/blog/tag/webpart/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.comperiosearch.com</link>
	<description>A blog about Search as THE solution</description>
	<lastBuildDate>Mon, 13 Jun 2016 08:59:45 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>Doing blended search results in SharePoint&#8211;Part 2: The Custom CoreResultsWebPart Way</title>
		<link>http://blog.comperiosearch.com/blog/2010/12/20/doing-blended-search-results-in-sharepointpart-2-the-custom-coreresultswebpart-way/</link>
		<comments>http://blog.comperiosearch.com/blog/2010/12/20/doing-blended-search-results-in-sharepointpart-2-the-custom-coreresultswebpart-way/#comments</comments>
		<pubDate>Mon, 20 Dec 2010 09:00:00 +0000</pubDate>
		<dc:creator><![CDATA[Mikael Svenson]]></dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[enterprise search]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[webpart]]></category>

		<guid isPermaLink="false">http://nuggets.comperiosearch.com/2010/12/doing-blended-search-results-in-sharepointpart-2-the-custom-coreresultswebpart-way/</guid>
		<description><![CDATA[(Part 1: The Hackish Way) In Part 1 I used two Search Core Results Web Parts and a bit of jQuery magic to achive the look of blended search results This time we will create our own CoreResultsWebPart and inject the blended results into the result xml before it is transformed into html. In addition [...]]]></description>
				<content:encoded><![CDATA[<p>(<a href="http://techmikael.blogspot.com/2010/12/doing-blended-results-in-sharepointpart.html" target="_blank">Part 1: The Hackish Way</a>)</p>
<p>In Part 1 I used two Search Core Results Web Parts and a bit of jQuery magic to achive the look of blended search results</p>
<p>This time we will create our own CoreResultsWebPart and inject the blended results into the result xml before it is transformed into html. In addition to blend in news results I decided to get some  images as well. I did this by importing a “Federated Location” for Flickr. The location definition can be found at “<a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=96dffda9-5597-44a0-88e9-23e21925f978&amp;displaylang=en" target="_blank">Flickr Search Connector for SharePoint Server, Search Server, and FAST Search for SharePoint</a>”.</p>
<p>I started off by creating an empty SharePoint 2010 project in VS2010 and added a new web part.</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2010/12/image4.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="http://blog.comperiosearch.com/wp-content/uploads/2010/12/image_thumb4.png" border="0" alt="image" width="288" height="279" /></a></p>
<p>After deploying and activating the feature I replaced the Search Core Results Web Part with my own Search Blended Core Results Web Part.</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2010/12/image5.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="http://blog.comperiosearch.com/wp-content/uploads/2010/12/image_thumb5.png" border="0" alt="image" width="354" height="168" /></a></p>
<p>Since I use FS4SP as the search back-end remember to copy the xslt from the original web part as the default xslt is for internal SharePoint search.</p>
<p>By overriding the GetXPathNavigator we have full control over the result xml. The blended results are retrieved asynchronous while we get the local results from the page’s query manager on the main thread.</p><pre class="crayon-plain-tag">&lt;span class=&quot;kwrd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;override&lt;/span&gt; XPathNavigator GetXPathNavigator(&lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; viewPath)
{
    QueryManager queryManager = SharedQueryManager.GetInstance(Page).QueryManager;
    Func&amp;lt;QueryManager, StringBuilder&amp;gt; blend = GetBlendedResults;
    IAsyncResult asyncResult = blend.BeginInvoke(queryManager, &lt;span class=&quot;kwrd&quot;&gt;null&lt;/span&gt;, &lt;span class=&quot;kwrd&quot;&gt;null&lt;/span&gt;);
    &lt;span class=&quot;rem&quot;&gt;// Get local results&lt;/span&gt;
    XmlDocument xmlDocument = queryManager.GetResults(queryManager[0]);
    &lt;span class=&quot;rem&quot;&gt;// Get blended results&lt;/span&gt;
    StringBuilder sb = blend.EndInvoke(asyncResult);
    InsertBlendedResults(sb, xmlDocument);
    &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; xmlDocument.CreateNavigator();
}</pre><p>The blended searches have been hard coded for Bing News and Flickr, but you could very well modify the web part to include settings where you choose which federated locations to use for your blended results. In order to execute the search we create a new QueryManager object and add both search locations to it. This enables the QueryManager to execute both the news and the images search at the same time, and the results are concatenated as two channels inside the returning rss feed. The rest of the code is parsing the rss and appending it into the main xml results.</p>
<div>
<pre class="crayon-plain-tag">&lt;span class=&quot;kwrd&quot;&gt;private&lt;/span&gt; XmlDocument GetBlendedResultsXml(QueryManager queryManager)
{
    SPServiceContext context = SPServiceContext.GetContext(SPServiceApplicationProxyGroup.Default, SPSiteSubscriptionIdentifier.Default);
    SearchServiceApplicationProxy searchProxy = context.GetDefaultProxy(&lt;span class=&quot;kwrd&quot;&gt;typeof&lt;/span&gt; (SearchServiceApplicationProxy)) &lt;span class=&quot;kwrd&quot;&gt;as&lt;/span&gt; SearchServiceApplicationProxy;
    QueryManager blendedQuery = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; QueryManager {UserQuery = queryManager.UserQuery};
    LocationList locList = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; LocationList();
    Location internetLocation = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; Location(&lt;span class=&quot;str&quot;&gt;&quot;InternetSearchResults&quot;&lt;/span&gt;, searchProxy) {ItemsPerPage = 3};
    locList.Add(internetLocation);

    Location flickrLocation = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; Location(&lt;span class=&quot;str&quot;&gt;&quot;Flickr&quot;&lt;/span&gt;, searchProxy) {ItemsPerPage = 3};
    locList.Add(flickrLocation);

    blendedQuery.Add(locList);
    blendedQuery.IsTriggered(locList);
    &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; blendedQuery.GetResults(locList);
}</pre>
</div>
<div>The complete code can be downloaded from my SkyDrive and includes result.xslt which is used for rendering the results. Click the icon below for the download.</div>
<p><a href="http://cid-9ecc38025e460fc4.office.live.com/self.aspx/.Public/BlendedCoreResultsWebPart.zip"> <img style="cursor: move;" src="http://msc.wlxrs.com/9X-1FV0Ez65-mbegJU4c3g/images/icons/Large/Zip.png" alt="" /></a></p>
<p><a href="http://cid-9ecc38025e460fc4.office.live.com/self.aspx/.Public/BlendedCoreResultsWebPart.zip"> </a></p>
<p><a href="http://cid-9ecc38025e460fc4.office.live.com/self.aspx/.Public/BlendedCoreResultsWebPart.zip">BlendedCoreResultsWebPart.zip</a></p>
<div>Creating the xml for the blended results is fairly easy and for the images I add nodes to make the results look like they came from a SharePoint picture library in order to utilize image display already in the xslt. I have also added some markers which are used in the xslt to define the start and stop of the blended results so I can add a headline marking the blended section.</div>
<div>The following regular expression is used to pull out the image url from the RSS summary.</div>
<p></p><pre class="crayon-plain-tag">&lt;span class=&quot;kwrd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;static&lt;/span&gt; Regex _imgExtract = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; Regex(&lt;span class=&quot;str&quot;&gt;&quot;img src=\&quot;(?&amp;lt;url&amp;gt;.*?)\&quot;&quot;&lt;/span&gt;, RegexOptions.Compiled);</pre><p></p>
<div>And the code to build the result xml for each item:</div>
<p></p><pre class="crayon-plain-tag">&lt;span class=&quot;kwrd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;void&lt;/span&gt; CreateResultXmlFragment(XmlWriter writer, SyndicationItem rssItem, &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; positionType)</pre><p></p><pre class="crayon-plain-tag">{
    writer.WriteStartElement(&lt;span class=&quot;str&quot;&gt;&quot;Result&quot;&lt;/span&gt;);
    writer.WriteElementString(&lt;span class=&quot;str&quot;&gt;&quot;title&quot;&lt;/span&gt;, rssItem.Title.Text);
    writer.WriteElementString(&lt;span class=&quot;str&quot;&gt;&quot;description&quot;&lt;/span&gt;, rssItem.Summary.Text);
    writer.WriteElementString(&lt;span class=&quot;str&quot;&gt;&quot;write&quot;&lt;/span&gt;, rssItem.PublishDate.Date.ToString(&lt;span class=&quot;str&quot;&gt;&quot;MM/dd/yyyy&quot;&lt;/span&gt;));
    writer.WriteElementString(&lt;span class=&quot;str&quot;&gt;&quot;url&quot;&lt;/span&gt;, rssItem.Links.First().Uri.OriginalString);
    writer.WriteStartElement(&lt;span class=&quot;str&quot;&gt;&quot;imageurl&quot;&lt;/span&gt;);
    writer.WriteAttributeString(&lt;span class=&quot;str&quot;&gt;&quot;imageurldescription&quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&quot;Web Page&quot;&lt;/span&gt;);
    writer.WriteString(&lt;span class=&quot;str&quot;&gt;&quot;/_layouts/images/html16.png&quot;&lt;/span&gt;);
    writer.WriteEndElement();
    Match m = _imgExtract.Match(rssItem.Summary.Text);
    &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (m.Success)
    {
        writer.WriteElementString(&lt;span class=&quot;str&quot;&gt;&quot;picturethumbnailurl&quot;&lt;/span&gt;, m.Groups[&lt;span class=&quot;str&quot;&gt;&quot;url&quot;&lt;/span&gt;].Value);
        writer.WriteElementString(&lt;span class=&quot;str&quot;&gt;&quot;contentclass&quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&quot;STS_ListItem_PictureLibrary&quot;&lt;/span&gt;);
        writer.WriteElementString(&lt;span class=&quot;str&quot;&gt;&quot;blendtype&quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&quot;Images&quot;&lt;/span&gt;);
    }
    &lt;span class=&quot;kwrd&quot;&gt;else&lt;/span&gt;
    {
        writer.WriteElementString(&lt;span class=&quot;str&quot;&gt;&quot;blendtype&quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&quot;News&quot;&lt;/span&gt;);
    }
    writer.WriteElementString(&lt;span class=&quot;str&quot;&gt;&quot;blended&quot;&lt;/span&gt;, positionType);
    writer.WriteEndElement();
}</pre><p><!--.csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<div>XSLT modification:</div>
<p></p><pre class="crayon-plain-tag">&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;xsl:if&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;test&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;blended = 'first'&quot;&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;xsl:value-of&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;blendtype&quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt; for &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;xsl:value-of&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;$Keyword&quot;&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;xsl:text&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;disable-output-escaping&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;='yes'&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;attr&quot;&gt;&amp;amp;lt;&lt;/span&gt;div style=&quot;margin-left: 20px;background-color:#eee;font-size: 0.8em&quot;&lt;span class=&quot;attr&quot;&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;xsl:text&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;xsl:if&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;</pre><p></p>
<div>By using the same internal sample data as in Part 1, the result looks like this with both news and images blended in:</div>
<div><a href="http://blog.comperiosearch.com/wp-content/uploads/2010/12/image6.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="http://blog.comperiosearch.com/wp-content/uploads/2010/12/image_thumb6.png" border="0" alt="image" width="371" height="484" /></a></div>
<div>Right now they take up too much space for production quality layout, but that’s an exercise left to the xsl savvy out there <img class="wlEmoticon wlEmoticon-smile" style="border-style: none;" src="http://blog.comperiosearch.com/wp-content/uploads/2010/12/wlEmoticon-smile.png" alt="Smile" />. And you probably don´t want to blend both news and images after hit number three.</div>
<div>
<p>And I want to thank <a href="http://www.dotnetmafia.com" target="_blank">Corey Roth</a> for his excellent posts on how to use the QueryManager class.</p>
<p>This post is cross-posted from <a href="http://techmikael.blogspot.com/2010/12/doing-blended-search-results-in.html" target="_blank">Tech and Me</a>.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.comperiosearch.com/blog/2010/12/20/doing-blended-search-results-in-sharepointpart-2-the-custom-coreresultswebpart-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XSLT creation revisited for SharePoint 2010 Search and a small search tip</title>
		<link>http://blog.comperiosearch.com/blog/2010/11/26/xslt-creation-revisited-for-sharepoint-2010-search-and-a-small-search-tip/</link>
		<comments>http://blog.comperiosearch.com/blog/2010/11/26/xslt-creation-revisited-for-sharepoint-2010-search-and-a-small-search-tip/#comments</comments>
		<pubDate>Fri, 26 Nov 2010 12:19:00 +0000</pubDate>
		<dc:creator><![CDATA[Mikael Svenson]]></dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[enterprise search]]></category>
		<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[webpart]]></category>

		<guid isPermaLink="false">http://nuggets.comperiosearch.com/2010/11/xslt-creation-revisited-for-sharepoint-2010-search-and-a-small-search-tip/</guid>
		<description><![CDATA[Search tip If you search with only a hash “#”, then you will do an empty search and all results are returned. When modifying the xslt for the Core Search Result Webpart it’s nice to know what data is actually included in the xml. SharePoint 2010 has a section called “How to: View Search Results [...]]]></description>
				<content:encoded><![CDATA[<p><strong>Search tip</strong><br />
If you search with only a hash “#”, then you will do an empty search and all results are returned.</p>
<p>When modifying the xslt for the Core Search Result Webpart it’s nice to know what data is actually included in the xml.</p>
<p>SharePoint 2010 has a section called “<a href="http://msdn.microsoft.com/en-us/library/ms546985.aspx" target="_blank">How to: View Search Results XML Data</a>” which also existed for 2007. This time around it has included the important (obsolete for HTML5) XMP tag which makes rendering xml a breeze. Best practice is to use the PRE tag, but then you have to html encode your tags for it to render correctly.</p>
<p>By substituting your xslt with the snippet below, you will get xml output instead in for your web part.</p>
<div id="codeSnippetWrapper">
<pre class="crayon-plain-tag">&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;xml&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;1.0&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;UTF-8&quot;&lt;/span&gt;?&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;xsl:stylesheet&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;1.0&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;xmlns:xsl&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;http://www.w3.org/1999/XSL/Transform&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;xsl:output&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;method&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;xml&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;1.0&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;UTF-8&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;indent&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;yes&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;/&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;xsl:template&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;match&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;/&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;xmp&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;xsl:copy-of&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;*&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;xmp&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;xsl:template&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;xsl:stylesheet&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;</pre>
</div>
<div>Which results in something like this</div>
<div id="codeSnippetWrapper">
<pre class="crayon-plain-tag">&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;All_Results&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;Result&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;1&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;workid&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;workid&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;rank&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;1006&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;rank&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;Your document title&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;author&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;Mikael Svenson&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;author&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;size&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;79872&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;size&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;http://server/path/test.html&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;description&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;description&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;write&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;11/1/2010&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;write&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;sitename&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;Procedures&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;sitename&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;collapsingstatus&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;collapsingstatus&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;hithighlightedsummary&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;This is a summary.&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;hithighlightedsummary&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;hithighlightedproperties&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;HHTitle&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;Your document title&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;HHTitle&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;HHUrl&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;http://server/path/test.html&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;HHUrl&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;hithighlightedproperties&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;imageurl&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;imageurldescription&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;=&quot;Web Page&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;/_layouts/images/html16.png&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;imageurl&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;contentclass&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;contentclass&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;isdocument&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;True&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;isdocument&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;picturethumbnailurl&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;picturethumbnailurl&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;http://server/path/test.html&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;serverredirectedurl&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;serverredirectedurl&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;fileextension&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;ASPX&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;fileextension&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;spsiteurl&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;spsiteurl&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;docvector&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;[procedure overview, 1][office procedure, 1][links, 0.707107]&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;docvector&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;fcocount&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;1&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;fcocount&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;fcoid&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;336059505871761914&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;fcoid&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;pictureheight&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;pictureheight&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;picturewidth&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;picturewidth&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;escbaseextension&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;xls&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;escbaseextension&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;escprojname&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;00 - UNDEFINED&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;escprojname&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;escdeptname&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;0000 - UNDEFINED&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;escdeptname&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;escprocnumber&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;escprocnumber&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;esccategoryname&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;COMPANY MANAGEMENT SYSTEM&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;esccategoryname&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;escsubcategoryname&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;GOVERNING DOCUMENTS&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;escsubcategoryname&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;eschistdocnum&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;eschistdocnum&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;Result&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #800000;&quot;&gt;All_Results&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;gt;&lt;/span&gt;</pre>
</div>
<p>This is a result using FS4SP which includes the docvector tag which included concepts from the text. The last properties starting with “esc” are custom defined fields which I’ve added to the Display Properties –&gt; Fetched Properties setting on the Core Result Web Part.</p>
<p>With this xml as a reference, it’s easy to create and modify the default xslt.  I usually keep two Core Result Web Parts on the page while creating it, one with the rendered output and one with xml for reference. Once I’m done, I’ll remove my debug part from the page and package it all up for deployment.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.comperiosearch.com/blog/2010/11/26/xslt-creation-revisited-for-sharepoint-2010-search-and-a-small-search-tip/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
