Solved

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

Posted on 2013-01-22
3
1,631 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

If you create your solutions on SharePoint sooner or later you will come upon a request to set  permissions of the item depending on some of the item's meta-data - the author, people assigned as approvers, divisions, categories etc. The most natu…
For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

724 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