I'm trying to remove comments link from post in sharepoint 2010 blog. I found out that there is a section in
blog.xsl in 14 hive responsible for that. After commenting out that section, I was able to remove this link from post view.
But I need to toggle this link. What I tried to do is to place modified content of
Xsl property of post view. Unfortunately that doesn't work, because I'm getting exception saying:
Error while executing web part: System.Xml.Xsl.XslLoadException: Stylesheet must start either with an 'xsl:stylesheet' or an 'xsl:transform' element, or with a literal result element that has an 'xsl:version' attribute, where prefix 'xsl' denotes the 'http://www.w3.org/1999/XSL/Transform' namespace. An error occurred at (1,1). at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver) at System.Xml.Xsl.XslCompiledTransform.Load(XmlReader stylesheet, XsltSettings settings, XmlResolver stylesheetResolver) at Microsoft.SharePoint.WebPartPages.BaseXsltListWebPart.LoadXslCompiledTransform(WSSXmlUrlResolver someXmlResolver) at Microsoft.SharePoint.WebPartPages.DataFormWebPart.GetXslCompiledTransform() at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform(Boolean bDeferExecuteTransform)
Same thing happens when I try to place there original
blog.xsl contents. I'm setting
Xsl property by powershell. First I use
Get-Content cmdlet to load xsl file and then I assign it's value to
Any ideas why this happens? stylesheet itself looks good, without errors.