Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm working on customization of some ContentByQueryWebPart.

This customization consists in defining custom contentquerymain.xsl and itemstyle.xsl file.

However, from one customization to another, only small changes are applied. For example, depending on the webpart, I'm changing the beginList variable to apply custom css class, or I add some custom markup.

The side effect, is that if I change something that is shared between all instances, I have to report the changes in all xsl files.

Is there a clean way to factorize standard xsl templates?

I've seen the <xsl:import> node, but I could not make it work.

[Edit] After some test, I discover that I can "import" the xsl will something like :

<xsl:import 
    href="/sites/mysitecollection/Style%20Library/XSL%20Style%20Sheets/ContentQueryMainCustom.xsl"
    />

However, this is not dynamic, I have to know the site collection url in advance to make it works

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.