How to add multiple formats for <li> element in <ul>

Derek Fess

I'm running DITA-OT 3.2.1

Our company has rebranded, and as such we now have a new Marketing style guide. I need to format three levels of bullets. This part I've done (using the commonvariables.xml file). However, I need to make them different colors depending on which level they are at. All that I can seem to do is set the color for all levels, using the ul.li__label attribute set. If I understand correctly, I can make a new attribute set (say, but would have to call it from the lists.xsl file. This is where I am stuck. I do not know xslt well enough to know how to construct what I need. I know I need to use this piece of code from the pdf2 lists.xsl file:

<xsl:template match="*[contains(@class, ' topic/ul ')]/*[contains(@class, ' topic/li ')]">
        <xsl:variable name="depth" select="count(ancestor::*[contains(@class, ' topic/ul ')])"/>
        <fo:list-item xsl:use-attribute-sets="">
            <xsl:call-template name="commonattributes"/>
            <fo:list-item-label xsl:use-attribute-sets="ul.li__label">
                <fo:block xsl:use-attribute-sets="ul.li__label__content">
                    <xsl:call-template name="getVariable">
                        <xsl:with-param name="id" select="concat('Unordered List bullet ', (($depth - 1) mod 4) + 1)"/>
            <fo:list-item-body xsl:use-attribute-sets="ul.li__body">
                <fo:block xsl:use-attribute-sets="ul.li__content">

Any help would be greatly appreciated.

Join to automatically receive all group messages.