LI with bullet

Post here questions and problems related to editing and publishing DITA content.
Le Basque
Posts: 147
Joined: Sat Oct 19, 2013 8:21 am

LI with bullet

Post by Le Basque »

Hi,

Is it possible to change the bullet LI tags for levels two, three etc..
Currently whatever the level is the same bullet

Thank you
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: LI with bullet

Post by sorin_ristache »

Hi,

Your request is not clear. Do you want to change the marker for list items of an unordered list from the default character, which is a bullet, to a different character? Where do you want to change it: in Oxygen Author editing mode, in PDF output, in XHTML output, etc?


Regards,
Sorin
Le Basque
Posts: 147
Joined: Sat Oct 19, 2013 8:21 am

Re: LI with bullet

Post by Le Basque »

No i want to change the marker for different level of imbrication list.
I found a solution :
I calculate level of ul and define variable in en.xml for differente level

Code: Select all

<variable id="Unordered List bullet L2">&#x25AA;</variable>
<variable id="Unordered List bullet L3">&#x2023;</variable>
Thank you
cjbcjb
Posts: 18
Joined: Thu Feb 07, 2013 7:20 pm

Re: LI with bullet

Post by cjbcjb »

I need to do the same thing. I found the section in en.xml to select the Unordered List bullet variable, but how do you select a different variable for each level?

Code: Select all

    <xsl:template match="*[contains(@class, ' topic/ul ')]/*[contains(@class, ' topic/li ')]">
<fo:list-item xsl:use-attribute-sets="ul.li">
<fo:list-item-label xsl:use-attribute-sets="ul.li__label">
<fo:block xsl:use-attribute-sets="ul.li__label__content">
<fo:inline>
<xsl:call-template name="commonattributes"/>
</fo:inline>
<xsl:call-template name="insertVariable">
<xsl:with-param name="theVariableID" select="'Unordered List bullet'"/>
</xsl:call-template>
</fo:block>
</fo:list-item-label>

<fo:list-item-body xsl:use-attribute-sets="ul.li__body">
<fo:block xsl:use-attribute-sets="ul.li__content">
<xsl:apply-templates/>
</fo:block>
</fo:list-item-body>

</fo:list-item>
</xsl:template>
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: LI with bullet

Post by sorin_ristache »

cjbcjb wrote:I found the section in en.xml to select the Unordered List bullet variable, but how do you select a different variable for each level?
This distinction is not made in the DITA PDF transformation. You will need to customize that DITA-OT\plugins\org.dita.pdf2\xsl\fo\lists.xsl stylesheet file to handle also nested ul/li/ul/li elements. I recommend adding a new template like the following for the nested ul/li/ul/li structures:

Code: Select all

  <xsl:template match="*[contains(@class, ' topic/ul ')]/*[contains(@class, ' topic/li ')]/*[contains(@class, ' topic/ul ')]/*[contains(@class, ' topic/li ')]">
<fo:list-item xsl:use-attribute-sets="ul.li.ul.li">
<fo:list-item-label xsl:use-attribute-sets="ul.li.ul.li__label">
<fo:block xsl:use-attribute-sets="ul.li.ul.li__label__content">
. . .
You should start from the following file with your DITA PDF customization:

OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\org.dita.pdf2\Customization\README.txt
Regards,
Sorin

<oXygen/> XML Editor Support
Post Reply