Advertisement

03.12.2008 at 04:32PM PDT, ID: 23237099
[x]
Attachment Details

SharePoint 2007 Custom XSLT in Search Results Does Not Display

Asked by TexasMoss in Extensible Stylesheet Language Transformation (XSLT), MOSS-Sharepoint

Hi I have a sharepoint Search Core Results web part that I customized the results for in SharePoint designer.  The search results are not being displayed, but the column headers are fine.

I have another search web part on the same page and i'm getting the default look for the search results, so i know the search is working.  I've attached the xslt to look at, any thoughts anyone?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
<xsl:stylesheet version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">
	<xsl:output method="html" indent="no"/>
	<xsl:decimal-format NaN=""/>
	<xsl:param name="FileName" />
	<xsl:param name="dvt_apos">'</xsl:param>
	
	<xsl:variable name="dvt_1_automode">0</xsl:variable>
	<xsl:template match="/">
		<xsl:call-template name="dvt_1"/>
	</xsl:template>
	<xsl:template name="dvt_1">
		<xsl:variable name="dvt_StyleName">Table</xsl:variable>
		<xsl:variable name="Rows" select="/Result"/>
		<table border="0" width="100%" cellpadding="2" cellspacing="0">
			<tr valign="top">
				<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
					<th class="ms-vh" width="1%" nowrap="nowrap"></th>
				</xsl:if>
				<th class="ms-vh" nowrap="nowrap">idm-vip</th>
				<th class="ms-vh" nowrap="nowrap">idm-hicn</th>
				<th class="ms-vh" nowrap="nowrap">idm-customerfirstname</th>
				<th class="ms-vh" nowrap="nowrap">idm-customermiddlename</th>
				<th class="ms-vh" nowrap="nowrap">idm-customerlastname</th>
			</tr>
			<xsl:call-template name="dvt_1.body">
				<xsl:with-param name="Rows" select="$Rows"/>
			</xsl:call-template>
		</table>
	</xsl:template>
	<xsl:template name="dvt_1.body">
		<xsl:param name="Rows"/>
		<xsl:for-each select="$Rows">
			<xsl:call-template name="dvt_1.rowview"/>
		</xsl:for-each>
	</xsl:template>
	<xsl:template name="dvt_1.rowview">
		<tr>
			<xsl:if test="position() mod 2 = 1">
				<xsl:attribute name="class">ms-alternating</xsl:attribute>
			</xsl:if>
			<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
				<td class="ms-vb" width="1%" nowrap="nowrap">
					<span ddwrt:amkeyfield="" ddwrt:amkeyvalue="string($XPath)" ddwrt:ammode="view"></span>
				</td>
			</xsl:if>
			<td class="ms-vb">
				<xsl:value-of select="idm-vip"/>
			</td>
			<td class="ms-vb">
				<xsl:value-of select="idm-hicn"/>
			</td>
			<td class="ms-vb">
				<xsl:value-of select="idm-customerfirstname"/>
			</td>
			<td class="ms-vb">
				<xsl:value-of select="idm-customermiddlename"/>
			</td>
			<td class="ms-vb">
				<xsl:value-of select="idm-customerlastname"/>
			</td>
		</tr>
	</xsl:template>
</xsl:stylesheet>
[+][-]03.12.2008 at 11:27PM PDT, ID: 21113765

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.13.2008 at 06:18AM PDT, ID: 21115847

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.13.2008 at 06:50AM PDT, ID: 21116138

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.13.2008 at 08:29AM PDT, ID: 21117190

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.13.2008 at 08:31AM PDT, ID: 21117218

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.13.2008 at 10:26AM PDT, ID: 21118563

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.13.2008 at 11:49AM PDT, ID: 21119430

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.13.2008 at 11:49AM PDT, ID: 21119436

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Extensible Stylesheet Language Transformation (XSLT), MOSS-Sharepoint
Sign Up Now!
Solution Provided By: psgindiana
Participating Experts: 2
Solution Grade: B
 
 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • Automotive
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Displays / Monitors
  • Handhelds / PDAs
  • Components
  • Peripherals
  • Laptops/Notebooks
  • Servers
  • Misc
  • Apple
  • Embedded Hardware
  • Networking Hardware
  • Storage
  • Desktops
  • New Users
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMware
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Virtualization
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • Web Computing
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Consulting
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMware
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Automation
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Web Services
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Web Computing
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Lounge
  • Business Travel
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
  • Automotive
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
03.12.2008 at 11:27PM PDT, ID: 21113765
I assume that the search results are in a namespace.
Can you sho us the resutling XML?

If you can't, you can repace the XSLT with an identity transform,
then you get the source as result
 
03.13.2008 at 06:18AM PDT, ID: 21115847
The resulting XML follows, I can get the raw results, just when I style it up I'm having problems :(
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
<Result>
      <id>1</id>
      <workid>xxx</workid>
      <rank>xxxx</rank>
      <title>xxxxxxxxxx</title>
      <author>xxxxxxx</author>
      <size>xxxxx</size>
      <url>http://xxxxxxx/IDM Documents/Forms/DispForm.aspx?ID=536</url>
      <urlEncoded>http%3A%2F%2Fxxxxxx%2FIDM%20Documents%2FForms%2FDispForm%2Easpx%3FID%3D536</urlEncoded>
      <description></description>
      <write>5/6/2005</write>
      <sitename>http://xxxxxx</sitename>
      <collapsingstatus>0</collapsingstatus>
      <hithighlightedproperties>
        <HHTitle>5909346MEDICARE</HHTitle>
        <HHUrl>http://tssdocs/IDM Documents/Forms/DispForm.aspx?ID=536</HHUrl>
      </hithighlightedproperties>
      <contentclass>STS_ListItem_DocumentLibrary</contentclass>
      <isdocument>0</isdocument>
      <picturethumbnailurl></picturethumbnailurl>
      <idm-vip>xxxxxxx</idm-vip>
      <idm-hicn>xxxxxxxx</idm-hicn>
      <idm-customerfirstname>xxxxx</idm-customerfirstname>
      <idm-customermiddlename></idm-customermiddlename>
      <idm-customerlastname>xxxxxxx</idm-customerlastname>
      <imageurl imageurldescription="Result of type: document">/_layouts/images/html16.gif</imageurl>
</Result>
Open in New Window
 
03.13.2008 at 06:50AM PDT, ID: 21116138
Allthough you are using some weird named templates,
where I would use simple templates with a match,
your xml seems to work on the raw data,

but I am suspicious about the <Result> root tag
(you explicitely expect Result to be the root in your stylesheet
How does this look when more than oe row is returned?
 
03.13.2008 at 08:29AM PDT, ID: 21117190
I object against deletion.
Efforts have been made by experts to analyse the problem and suggestions have been made for solutions.
If a solution has been found otherwise, the solution should be posted here.
If the problem is no longer relevant, I would like to know why.
Thanks

Geert
 
03.13.2008 at 08:31AM PDT, ID: 21117218
If the problem is the exposure of the data, you should ask an administrator to delete the XML containing comment only.
This can be done without a couple of days waiting
You should not delete the entire quetion for this.
 
03.13.2008 at 10:26AM PDT, ID: 21118563
how do I go about doing this?  I don't see anywhere to report to an administrator, and I'm unable to edit the question on my own.  Can someone please advise?

how do I contact an administrator for editing?  how do i get the xml cleared fro cache, etc?
 
03.13.2008 at 11:49AM PDT, ID: 21119430
Try posting a question in general community support
http://www.experts-exchange.com/Community_Support/General/
Ask specificaly which part of the question you want to have deleted
 
03.13.2008 at 11:49AM PDT, ID: 21119436
First, looks like your data has been redacted...good.

Second, can you try to remove your "if" statements in your dv_1.rowview template and see what happens?  I like to try to limit the number of things that can be wrong when troubleshooting.  Even throw in a "TEST" inside of your for each loop to see if that is working correctly.  Try to pinpoint exactly where the problem lies.
Accepted Solution
 
 
20080716-EE-VQP-32 / EE_QW_2_20070628