Is there a way to use 14hive(!) custom resources ( Resource:MyCompany.MyProject.resx, MyProject.SomeComponent.SomeResourceKey; ) in a XSLT files for XsltListViewWebPart (and views)? Please, notice the dot separator in resx filename and key values. I have read what Andrey described for GlobalApp resources. Tried Core.resx resources works for me:

view.ParameterBindings = 
@"<ParameterBinding Name=""TCMessage"" Location=""Resource(core,Tasks_Completed)"" />";

but, not customized resources:

view.ParameterBindings = 
@"<ParameterBinding Name=""TCMessage"" Location=""Resource(MyCompany.MyProject,Tasks.Completed)"" />";

You use the following format, you are pretty close.

<xsl:value-of select="@Resources.resourceFile.ResourceName" />


<xsl:value-of select="@Resources.custom.custome_resource" />

will get custom.wss and custom_resource inside it.

| improve this answer | |
  • I have a naming rule in the company to use "." as separator in the resx file names and resx keys. Its the same way Andrey described in the entry (2 way). – dbardakov May 14 '13 at 12:32
  • You shouldn't use periods in file names, they are for file descriptor separators only. SharePoint doesn't support the use of multiple periods at all. SharePoint, ProFTP, TransferText, Symphony, KVR Audio and servedir all do not support multiple periods in file names. – Hugh Wood May 14 '13 at 13:00
  • What is the other issues with filenames containing periods in SharePoint? – dbardakov May 14 '13 at 15:34
  • 1
    Sharepoint uses almost the same file format recognising method throughout since early on frontpage portal. This is basically checking the file extension and splitting with periods. Any hive file with periods when SharePoint attempts to recognise the file type could fail because of this. It works fine with libraries because the files are checked by mime type, however say you work with the RPC functions to upload files these fail as they depend on file extensions. – Hugh Wood May 14 '13 at 17:08

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.