List sub categories with more than one main category

I’m trying to create a product catalog that has main categories, sub categories and products…

Sub categories can be under more than one main category and a product can be under more than one sub category.

I have set up a doc type for my sub categories where I have added a data type (Ultimate Picker - CheckBoxList). This let’s me choose what main categories a sub category belongs to when I create it.

Now I would like XSLT to list the sub categories…

<xsl:for-each select="umbraco.library:GetXmlNodeById($source)/* [@isDoc and string(umbracoNaviHide) != '1'][string(hovedkategori) = '1137']">
	<li>
		<a href="{umbraco.library:NiceUrl(@id)}">
			<xsl:value-of select="@nodeName"/>
		</a>
	</li>
</xsl:for-each>

This will show all the sub categories that has the main category (ID 1137) selected… but only that ID. So a sub category that has more than that one main category selected will not show.

How do I get it to show sub categories that among others have the specific main category ID?

/cheers


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/75372-list-sub-categories-with-more-than-one-main-category