Solved

Failed setting processor style sheet: 0x80004005: Named template does not exist in the style sheet

Posted on 2013-01-22
3
1,562 Views
Last Modified: 2013-01-28
Note this is my first foray into creating  templates. using Sharepoint and Sharepoint designer 2010, and IE8 as the browser. For testing , I have created a empty DVWP and linked it to a document library. I am displaying a column with the document title ( @Title)  followed by a second column displaying  the  text “Success”.  I wish to replace this with a XSL Template, with the intent of using  a more extensive XSL:CHOOSE statement farther down the road.  My initial code I want to duplicate in a template is :
<td ><xsl:value-of select="@Title"/></td>
<td ><xsl:text>Success</xsl:text></td>

Open in new window

This works as expected  in the browser and SPD, displaying “DocumentTitle” in the first column and  “Success”  in the second.

I have created a XSl Stylesheet with the a template and placed it in
 
https://MyServer/Sitea/MySite/Style Library/XSL Style Sheets/DocStatusIcon.xsl

Open in new window


The template  code is
<xsl:stylesheet version="1.0"
 xmlns:x="http://www.w3.org/2001/XMLSchema"
 xmlns:d="http://schemas.microsoft.com/sharepoint/dsp"
 xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<xsl:template name="TempText">
	<xsl:text>Success</xsl:text>
	</xsl:template>
</xsl:stylesheet>

Open in new window


In the DVWP I used XSL:Import  to import the template. Note the Absolute path in href.
<XSL>
<xsl:stylesheet [truncate code] >
<xsl:import href="https://MyServer/sites/MySite/Style Library/XSL Style Sheets/DocStatusIcon.xsl"/>
<xsl:output method="html" indent="no"/>

Open in new window

:

At this point SPD and IE8 still displays the expected 2 columns with the second one empty. I replaced XSL:Text  with a XSL:call template in the DVWP
<td ><xsl:value-of select="@Title"/></td>
<td><xsl:call-template name="TempText"></xsl:call-template></td>

Open in new window


At this point IE8 displays the expected result, 2 columns with the first showing the name and the second displaying "Success". Unfortunately SPD now displays
"SharePoint Designer cannot render the XSLT in the Data View. Try to undo your changes or re-insert the data View. Failed setting processor style sheet: 0x80004005: Named template 'TempText' does not exist in the style sheet.
Out of curiosity, thinking somehow it was not importing the style sheet, I changed the href in the xsl import command from a absolute to a relative path
 <xsl:import href="/sites/MySite/Style Library/XSL Style Sheets/DocStatusIcon.xsl"/>

Open in new window


Now SPD displays the expected result but IE8 fails with this error
"Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator. Correlation ID:dd2ea5b8-e9f0-4bcf-b592-f92ceb4b6977"
The Correlation ID changes each time you refresh the page.

While thinking on this , I switched the import comamnd from a relative to a absolute path adn back several times. Eventually both SPD and the browser display the error messages above. A jPG of the erros is attached.
Suggestions?
TemplateError.jpg
0
Comment
Question by:CptO
  • 2
3 Comments
 
LVL 15

Expert Comment

by:colly92002
ID: 38809496
Take a look at the ULS logs and see if there is a more detailed error in there (there will be LOTS of information being pumped out, just none of it being reported to you in a useful way) - you can search using the correclation ID for all messages realting to it.  You can use this to view the logs: http://archive.msdn.microsoft.com/ULSViewer

As SPD uses web services, you can also use Fiddler (http://www.fiddler2.com/fiddler2/) to watch the http traffic between SPD and teh Sharepoint host to see if that is throwing out any errors that are not being reported.  Sharepoint is AWFUL at error reporting, but with these two tools you can often get to the root of a problem.
0
 

Accepted Solution

by:
CptO earned 0 total points
ID: 38811149
I will see if I can get our server admins to coordinate looking at the USL logs
A user in the Microsoft Sharepoint forums gave me a solution. Change

 <xsl:import href="/sites/MySite/Style Library/XSL Style Sheets/DocStatusIcon.xsl

Open in new window

to
<xsl:import href="../Style Library/XSL Style Sheets/DocStatusIcon.xsl

Open in new window

If I am on a subsite I would use
<xsl:import href="../../Style Library/XSL Style Sheets/DocStatusIcon.xsl

Open in new window

Now if I can just figure out why. It should work either way.
0
 

Author Closing Comment

by:CptO
ID: 38826171
Resolutin found in another sharepoint related forum.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Dynamic content on SharePoint 2013 13 91
jQuery Generalization 3 69
Backup of Sharepoint Online 3 100
How to view calendars overlay in list view in SharePoint 2010? 1 70
I used to be SharePoint evangelist in our company, so my Outlook always full of questions about how to do this, or where I can find that. One day I found such an email with the following question: "how to attach 3-State workflow (one of the workflow…
There is one common problem that all we SharePoint developers share: custom solution deployment. This topic can't be covered fully in this short article, so all I want to do in this one is to review it from a development-to-operations perspectiv…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question