Re: Dynamic space adjustment between fo:list-tem-label and fo:list-item-body
Hi Oleg, thanks for that advise. I finally find a solution based on your hint. Greetings Chris Vejrazka At 23:53 29.11.2002, you wrote: A workaround could be to change provisional-distance-between-starts value dynamically according to length of xsl:number return value in em units. Something like xsl:variable name=label xsl:call-template name=countLi/ /xsl:variable fo:list-block provisional-distance-between-starts={string-length($label)}em - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dynamic space adjustment between fo:list-tem-label and fo:list-item-body
Greetings everbody, i hope that i can get some help on my problem here and that i dont bother you with a newbie question. We have xml-dtd in use that allows the creation of neested, ordered lists in our xml-documents. Here is the code fragment that i use to create the list part of the fo stylesheet: !-- template for count on all ordered list items-- xsl:template name=countLi xsl:for-each select=. xsl:number format=1. level=multiple count=[EMAIL PROTECTED] = 'Yes']/Li/ /xsl:for-each /xsl:template xsl:template match=Source//[EMAIL PROTECTED] = 'Yes'] fo:list-block provisional-label-separation=0.5cm provisional-distance-between-starts=1cm xsl:for-each select=Li fo:list-item fo:list-item-label end-indent=label-end() fo:block font-family=Times font-size=12pt text-align=left line-height=13pt wrap-option=wrap !-- call template count and recieve count result -- xsl:call-template name=countLi/ /fo:block /fo:list-item-label fo:list-item-body start-indent=body-start() fo:block xsl:apply-templates/ /fo:block /fo:list-item-body /fo:list-item /xsl:for-each /fo:list-block /xsl:template I count the list items wit xsl:number and depending on the level of neesting i achieve different results (i.e. 1.2 or 1.2.1.) therefore i have different space usage in fo:list-item-label but i have no idea how i can manage it to handle the space between fo:list-item-label and fo:list-item-body dynamically, so that number count result doesnt override the content of my list body. With the given code-example i have always a space separation of 0.5cm between the label and the body and if the neesting reachs level 4 i override the content of list-item-body. I thought that with attribute start-indent and the use of the function body-start() the value for start-indent on the list-item-body is calculated on the value in provisional-distance-between-starts but that doesnt seem to work... any help is greatly appreciated, christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic space adjustment between fo:list-tem-label and fo:list-item-body
Chris Vejrazka wrote: I count the list items wit xsl:number and depending on the level of neesting i achieve different results (i.e. 1.2 or 1.2.1.) therefore i have different space usage in fo:list-item-label but i have no idea how i can manage it to handle the space between fo:list-item-label and fo:list-item-body dynamically, so that number count result doesnt override the content of my list body. With the given code-example i have always a space separation of 0.5cm between the label and the body and if the neesting reachs level 4 i override the content of list-item-body. I thought that with attribute start-indent and the use of the function body-start() the value for start-indent on the list-item-body is calculated on the value in provisional-distance-between-starts but that doesnt seem to work... fo:list-block in xsl-fo is rather obstinate formatting object, it's stylesheet author resposibility to provide big enough provisional-distance-between-starts to cater all possible label values. A workaround could be to change provisional-distance-between-starts value dynamically according to length of xsl:number return value in em units. Something like xsl:variable name=label xsl:call-template name=countLi/ /xsl:variable fo:list-block provisional-distance-between-starts={string-length($label)}em PS. Just a late night idea. -- Oleg Tkachenko eXperanto team Multiconn Technologies, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]