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 :


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

Your Answer

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

Browse other questions tagged or ask your own question.