Link to home
Start Free TrialLog in
Avatar of CptO
CptOFlag for United States of America

asked on

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

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
Avatar of colly92002
colly92002
Flag of United Kingdom of Great Britain and Northern Ireland image

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.
ASKER CERTIFIED SOLUTION
Avatar of CptO
CptO
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CptO

ASKER

Resolutin found in another sharepoint related forum.