I'm trying to provision a .xsl file with custom styles to be applied to a Content Query Web Part in SP 2007 MOSS. I want to deploy it in a feature. So far any attempt has failed as I cannot retrieve my .xsl in the Style Library.

 <!-- Feature.xml -->
     <ElementManifest Location="Elements.xml" />
     <ElementFile Location="Test.xsl" />

 <!-- Elements.xml -->
 <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   <Module Name="Test" Url="Style Library/XSL Style Sheets" Path="" RootWebOnly="FALSE">
     <File Url="Test.xsl" Type="GhostableInLibrary"/>

There are no errors in the log files. For what I've seen on the web, this should work but it doesn't.

  • 1
    can you past the directory structure of your feature ? maybe a path related problem... – Steve B Jun 29 '11 at 8:05

Maybe it does not work because you set RootWebOnly="FALSE". The Style Library is a site collection thing. Try to set it to TRUE, activate the feature and see what happens. If you still cannot see the file/folder in the style library connect to it with SharePoint designer and check if it can see the file/folder.

| improve this answer | |

I can think of one thing, but it might not be a necessity: If your xsl-file is in a module, the Path attr. of the Module element should point to that, e.g. Path="MyModule". You can also try to add Path="Test.xsl" to the File element as well.

Both should not be necessary afaik though (You should have gotten an errormsg if the file was not found)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.