0
votes

I currently have custom XSL files that I am adding to content query web parts through manually adding the ItemXslLink property of the content query web part in code view. I have been reading that one can use the XSL:import tag in an XSL file to reference outside XSL Stylesheets. I do not wish to enter custom templates into ItemStyle.xsl as that is messy and can be overwritten.

I have been following the instructions for this in the following link very closely and the custom XSL is not coming through in the item style drop down for my content query web part. http://spxslt.codeplex.com/wikipage?title=Usage

Here is my code on the import and is contained in the same XSL Style Sheets folder as ItemStyle.xsl. The referenced file is proper XSL with the appropriate Stylesheet enclosing tags.

<xsl:stylesheet 
version="1.0" 
exclude-result-prefixes="x d xsl msxsl cmswrt"
xmlns:x="http://www.w3.org/2001/XMLSchema" 
xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" 
xmlns:cmswrt="http://schemas.microsoft.com/WebParts/v3/Publishing/runtime"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<xsl:import href="MyCustomXsl.xsl" />

Any ideas on why this seemingly simple xsl:import is not working? Help is greatly appreciated as this functionality would provide great solutions for the projects I am working on.

1

1 Answers

0
votes

It may be wise to provide the path to this MyCustomXsl.xsl as omitting it may translate into soemthing wrong.