Solved

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

Posted on 2013-01-22
3
1,603 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SharePoint sub-site searching and results. 8 44
Licensing Sharepoint 2016 for developers 11 77
Sharepoint 2010 2 27
Delete old Sharepoint backups 2 22
When installing SharePoint 2010 RTM I came across a strange error, I was getting timeouts during the installation. I searched the web and found the best solution to be found here (http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010genera…
I recently came across an issue with a MOSS 2007 deployment where access into some sub-sites were denied, even for the MOSS farm administrators. A bit of background to the setup of this MOSS farm; this was a three server setup, consisting of a fr…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

733 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