List Info

Thread: RE: table.of.contents.title.page.recto formatting not working




RE: table.of.contents.title.page.recto formatting not working
user name
2007-05-08 20:56:32
OK, finally figured out why this wasn't working. The
"generate.toc"
parameter was causing the TOC formatting to be ignored. When
I commented
out the following lines in my customization stylesheet, the
desired
formatting was applied:

	<xsl:param name="generate.toc">
	 	book toc
	 	qandaset  toc
	</xsl:param>

Did the "generate.toc" parameter change for
DocBook XSL 1.72?

Regards,
Jeff Powanda

-----Original Message-----
From: Jeff Powanda 
Sent: Monday, May 07, 2007 10:40 PM
To: docbook-appslists.oasis-open.org
Subject: RE: [docbook-apps]
table.of.contents.title.page.recto
formatting not working

One more try. I decided to replace the
"table.of.contents.titlepage.recto" template with
the following
template, which I copied directly from DocBook XSL: The
Complete Guide
by Bob Stayton
(http://www.sagehill.net/docbookxsl/PrintToc.html#TocTit
le).

Here's the template:

<xsl:template
name="table.of.contents.titlepage"
priority="1">
  <fo:block
xsl:use-attribute-sets="section.title.level1.properties
"
            space-before="1in"
            space-before.conditionality="retain"
            space-after="12pt"
            border-bottom="0.5pt solid black">
    <xsl:call-template name="gentext">
      <xsl:with-param name="key"
select="'TableofContents'"/>
    </xsl:call-template>
  </fo:block>
</xsl:template>

That didn't work either. The 'TableofContents' key from
gentext didn't
get added. So what's causing the title page formatting to
not get output
to the FO file?

Regards,
Jeff Powanda

-----Original Message-----
From: Jeff Powanda [mailto:jpowandavocera.com] 
Sent: Wednesday, May 02, 2007 12:10 PM
To: Bob Stayton; docbook-appslists.oasis-open.org
Subject: RE: [docbook-apps]
table.of.contents.title.page.recto
formatting not working


Still puzzled by this. Something that worked in DocBook XSL
1.69/FOP
0.25 doesn't work in DocBook XSL 1.72/FOP 0.94 and I don't
know why.

I reverted back to the original customization layer that
worked with
DocBook XSL 1.69 and FOP 0.25. Then I made the following
changes for FOP
0.93:

	<xsl:param
name="body.font.family">Frutiger-Light</xsl:
param> 
	<xsl:param
name="title.font.family">Frutiger-BlackCn</x
sl:param>
	<xsl:param
name="fop1.extensions">1</xsl:param>
	<xsl:param
name="fop.extensions">0</xsl:param>

The titlepage spec file hasn't changed, and it doesn't
customize the
"table.of.contents" element anyway.

The following template in my customization layer doesn't
work (that is,
doesn't change TOC formatting in the FO file).

<xsl:template
name="table.of.contents.titlepage.recto"> 

        <!-- Insert buckshot graphic at top of TOC title
page. -->  
		<fo:block	space-before.optimum="-0.6in"
space-before.minimum="-0.6in"
space-before.maximum="-0.6in"
	
space-after.optimum="0.25in"
space-after.minimum="0.25in"
space-after.maximum="0.25in">
			<xsl:attribute
name="text-align">right</xsl:attribute>
			<fo:external-graphic>
	    		<xsl:attribute name="src">
	    			<xsl:value-of
select="$chapter.titlepage.image"/>
	    		</xsl:attribute>
				<xsl:attribute
name="height">1.271in</xsl:attribute>
	    		<xsl:attribute
name="width">2.563in</xsl:attribute>    
	    		<xsl:attribute
name="content-width">2.563in</xsl:attribute&
gt;		
	  		</fo:external-graphic>  
		 </fo:block> 
		 	                 
  <fo:block xmlns:fo="http://www.w3
.org/1999/XSL/Format" 
 
xsl:use-attribute-sets="table.of.contents.titlepage.rec
to.style" 
                 text-align="left" 
                
margin-left="{$title.margin.left}" 

                 font-size="18pt" 
                 font-family="{$title.fontset}" 
                 font-weight="bold" 
                 start-indent="0in">
                 
         <!-- Put 4-dots graphic before TOC title. -->
                
		<fo:external-graphic>
    		<xsl:attribute name="src">
    			<xsl:value-of
select="$title.inline.image"/>
    		</xsl:attribute>
    		<xsl:attribute
name="content-width">0.25in</xsl:attribute&g
t;
    		<xsl:attribute
name="width">0.25in</xsl:attribute>
    		<xsl:attribute
name="height">0.236in</xsl:attribute>
  		</fo:external-graphic>  		 
  		
	  	<xsl:text> </xsl:text>                 
		<xsl:call-template name="gentext">
			<xsl:with-param name="key"
select="'TableofContents'"/>
		</xsl:call-template>
  </fo:block>
</xsl:template>

The component.title template in my customization layer has
similar
formatting that's processed correctly. So why isn't this
working in the
table of contents?

<!-- Title page for Chapter, Appendix, Index (also Part)
-->
<xsl:template name="component.title">
    
    <!-- Insert graphics: buckshot above title, 4 dots
before title -->
    <xsl:attribute
name="font-size">18pt</xsl:attribute>
		<fo:block	space-before.optimum="-0.6in"
space-before.minimum="-0.6in"
space-before.maximum="-0.6in"
	
space-after.optimum="0.25in"
space-after.minimum="0.2in"
space-after.maximum="0.3in">
			<xsl:attribute
name="text-align">right</xsl:attribute>
			<fo:external-graphic>
	    		<xsl:attribute name="src">
	    			<xsl:value-of
select="$chapter.titlepage.image"/>
	    		</xsl:attribute>
				<xsl:attribute
name="height">1.271in</xsl:attribute>
	    		<xsl:attribute
name="width">2.563in</xsl:attribute>    
	    		<xsl:attribute
name="content-width">2.563in</xsl:attribute&
gt;		
	  		</fo:external-graphic>  
		 </fo:block> 		

		<fo:external-graphic>
    		<xsl:attribute name="src">
    			<xsl:value-of
select="$title.inline.image"/>
    		</xsl:attribute>
    		<xsl:attribute
name="content-width">0.25in</xsl:attribute&g
t;
    		<xsl:attribute
name="width">0.25in</xsl:attribute>
    		<xsl:attribute
name="height">0.236in</xsl:attribute>
  		</fo:external-graphic>      
  		<xsl:text> </xsl:text>   
   
  </fo:block>
</xsl:template>


Regards,
Jeff Powanda

-----Original Message-----
From: Bob Stayton [mailto:bobssagehill.net] 
Sent: Tuesday, May 01, 2007 1:05 PM
To: Jeff Powanda; docbook-appslists.oasis-open.org
Subject: Re: [docbook-apps]
table.of.contents.title.page.recto
formatting not working

OK, but I'm not clear how it worked in FOP 0.25 if there is
no 
fo:external-graphic reference to the image file in the FO
output. 
Something else must have changed on the stylesheet side,
no?

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobssagehill.net


----- Original Message ----- 
From: "Jeff Powanda" <jpowandavocera.com>
To: "Bob Stayton" <bobssagehill.net>;
<docbook-appslists.oasis-open.org>
Sent: Tuesday, May 01, 2007 10:34 AM
Subject: RE: [docbook-apps]
table.of.contents.title.page.recto
formatting 
not working



Sorry for not being more specific. The graphic is missing
from the FO
file.

Regards,
Jeff Powanda


-----Original Message-----
From: Bob Stayton [mailto:bobssagehill.net]
Sent: Monday, April 30, 2007 11:46 PM
To: Jeff Powanda; docbook-appslists.oasis-open.org
Subject: Re: [docbook-apps]
table.of.contents.title.page.recto
formatting not working

Can you be more specific about what "not working"
means?  Does the
expected fo:external-graphic element appear in your FO file?
 That would
indicate whether the problem is with the customization layer
or FOP.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobssagehill.net



----- Original Message ----- 
From: Jeff Powanda <mailto:jpowandavocera.com>
To: docbook-appslists.oasis-open.org
Sent: Monday, April 30, 2007 6:13 PM
Subject: [docbook-apps] table.of.contents.title.page.recto
formatting not working


In my customization layer, I use the following template to
format the TOC titlepage for PDF output. It's not working.



The tools I'm using are DocBook XSL 1.72 and FOP 0.93. The
same
"table.of.contents.titlepage.recto" template
worked fine with FOP 0.25.
Anyone know what's wrong?



<xsl:template
name="table.of.contents.titlepage.recto">



        <!-- Insert buckshot graphic at top of TOC title
page.
-->

            <fo:block  
space-before.optimum="-0.6in"
space-before.minimum="-0.6in"
space-before.maximum="-0.6in"

                                   
space-after.optimum="0.25in"
space-after.minimum="0.25in"
space-after.maximum="0.25in">

                  <xsl:attribute
name="text-align">right</xsl:attribute>

                  <fo:external-graphic>

                  <xsl:attribute
name="src">

                        <xsl:value-of
select="$chapter.titlepage.image"/>

                  </xsl:attribute>

                        <xsl:attribute
name="height">1.271in</xsl:attribute>

                  <xsl:attribute
name="width">2.563in</xsl:attribute>

                  <xsl:attribute
name="content-width">2.563in</xsl:attribute&
gt;

                  </fo:external-graphic>

             </fo:block>



  <fo:block xmlns:fo="http://www.w3
.org/1999/XSL/Format"


xsl:use-attribute-sets="table.of.contents.titlepage.rec
to.style"

                 text-align="left"

                
margin-left="{$title.margin.left}"



                 font-size="18pt"

                 font-family="{$title.fontset}"

                 font-weight="bold"

                 start-indent="0in">



         <!-- Put 4-dots graphic before TOC title.
-->


            <fo:external-graphic>

            <xsl:attribute name="src">

                  <xsl:value-of
select="$title.inline.image"/>

            </xsl:attribute>

            <xsl:attribute
name="content-width">0.25in</xsl:attribute&g
t;

            <xsl:attribute
name="width">0.25in</xsl:attribute>

            <xsl:attribute
name="height">0.236in</xsl:attribute>

            </fo:external-graphic>



            <xsl:text> </xsl:text>

            <xsl:call-template
name="gentext">

                  <xsl:with-param name="key"
select="'TableofContents'"/>

            </xsl:call-template>

  </fo:block>

</xsl:template>



Regards,

Jeff Powanda





------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


Re: table.of.contents.title.page.recto formatting not working
user name
2007-05-08 21:09:39
Hi Jeff,
That solution seems a bit magical to me.  8^)  Would you
mind filing a bug 
report on the DocBook sourceforge site with an attachment of
small sample 
files that illustrate the effect?  I think this problem is
from a bug that 
I can't identify yet.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobssagehill.net


----- Original Message ----- 
From: "Jeff Powanda" <jpowandavocera.com>
To: <docbook-appslists.oasis-open.org>
Sent: Tuesday, May 08, 2007 6:56 PM
Subject: RE: [docbook-apps]
table.of.contents.title.page.recto formatting 
not working


OK, finally figured out why this wasn't working. The
"generate.toc"
parameter was causing the TOC formatting to be ignored. When
I commented
out the following lines in my customization stylesheet, the
desired
formatting was applied:

<xsl:param name="generate.toc">
book toc
qandaset  toc
</xsl:param>

Did the "generate.toc" parameter change for
DocBook XSL 1.72?

Regards,
Jeff Powanda

-----Original Message-----
From: Jeff Powanda
Sent: Monday, May 07, 2007 10:40 PM
To: docbook-appslists.oasis-open.org
Subject: RE: [docbook-apps]
table.of.contents.title.page.recto
formatting not working

One more try. I decided to replace the
"table.of.contents.titlepage.recto" template with
the following
template, which I copied directly from DocBook XSL: The
Complete Guide
by Bob Stayton
(http://www.sagehill.net/docbookxsl/PrintToc.html#TocTit
le).

Here's the template:

<xsl:template
name="table.of.contents.titlepage"
priority="1">
  <fo:block
xsl:use-attribute-sets="section.title.level1.properties
"
            space-before="1in"
            space-before.conditionality="retain"
            space-after="12pt"
            border-bottom="0.5pt solid black">
    <xsl:call-template name="gentext">
      <xsl:with-param name="key"
select="'TableofContents'"/>
    </xsl:call-template>
  </fo:block>
</xsl:template>

That didn't work either. The 'TableofContents' key from
gentext didn't
get added. So what's causing the title page formatting to
not get output
to the FO file?

Regards,
Jeff Powanda

-----Original Message-----
From: Jeff Powanda [mailto:jpowandavocera.com]
Sent: Wednesday, May 02, 2007 12:10 PM
To: Bob Stayton; docbook-appslists.oasis-open.org
Subject: RE: [docbook-apps]
table.of.contents.title.page.recto
formatting not working


Still puzzled by this. Something that worked in DocBook XSL
1.69/FOP
0.25 doesn't work in DocBook XSL 1.72/FOP 0.94 and I don't
know why.

I reverted back to the original customization layer that
worked with
DocBook XSL 1.69 and FOP 0.25. Then I made the following
changes for FOP
0.93:

<xsl:param
name="body.font.family">Frutiger-Light</xsl:
param>
<xsl:param
name="title.font.family">Frutiger-BlackCn</x
sl:param>
<xsl:param
name="fop1.extensions">1</xsl:param>
<xsl:param
name="fop.extensions">0</xsl:param>

The titlepage spec file hasn't changed, and it doesn't
customize the
"table.of.contents" element anyway.

The following template in my customization layer doesn't
work (that is,
doesn't change TOC formatting in the FO file).

<xsl:template
name="table.of.contents.titlepage.recto">

        <!-- Insert buckshot graphic at top of TOC title
page. -->
<fo:block space-before.optimum="-0.6in"
space-before.minimum="-0.6in"
space-before.maximum="-0.6in"

space-after.optimum="0.25in"
space-after.minimum="0.25in"
space-after.maximum="0.25in">
<xsl:attribute
name="text-align">right</xsl:attribute>
<fo:external-graphic>
    <xsl:attribute name="src">
    <xsl:value-of
select="$chapter.titlepage.image"/>
    </xsl:attribute>
<xsl:attribute
name="height">1.271in</xsl:attribute>
    <xsl:attribute
name="width">2.563in</xsl:attribute>
    <xsl:attribute
name="content-width">2.563in</xsl:attribute&
gt;
  </fo:external-graphic>
</fo:block>

  <fo:block xmlns:fo="http://www.w3
.org/1999/XSL/Format"

xsl:use-attribute-sets="table.of.contents.titlepage.rec
to.style"
                 text-align="left"
                
margin-left="{$title.margin.left}"

                 font-size="18pt"
                 font-family="{$title.fontset}"
                 font-weight="bold"
                 start-indent="0in">

         <!-- Put 4-dots graphic before TOC title.
-->
<fo:external-graphic>
    <xsl:attribute name="src">
    <xsl:value-of
select="$title.inline.image"/>
    </xsl:attribute>
    <xsl:attribute
name="content-width">0.25in</xsl:attribute&g
t;
    <xsl:attribute
name="width">0.25in</xsl:attribute>
    <xsl:attribute
name="height">0.236in</xsl:attribute>
  </fo:external-graphic>

  <xsl:text> </xsl:text>
<xsl:call-template name="gentext">
<xsl:with-param name="key"
select="'TableofContents'"/>
</xsl:call-template>
  </fo:block>
</xsl:template>

The component.title template in my customization layer has
similar
formatting that's processed correctly. So why isn't this
working in the
table of contents?

<!-- Title page for Chapter, Appendix, Index (also Part)
-->
<xsl:template name="component.title">

    <!-- Insert graphics: buckshot above title, 4 dots
before title -->
    <xsl:attribute
name="font-size">18pt</xsl:attribute>
<fo:block space-before.optimum="-0.6in"
space-before.minimum="-0.6in"
space-before.maximum="-0.6in"

space-after.optimum="0.25in"
space-after.minimum="0.2in"
space-after.maximum="0.3in">
<xsl:attribute
name="text-align">right</xsl:attribute>
<fo:external-graphic>
    <xsl:attribute name="src">
    <xsl:value-of
select="$chapter.titlepage.image"/>
    </xsl:attribute>
<xsl:attribute
name="height">1.271in</xsl:attribute>
    <xsl:attribute
name="width">2.563in</xsl:attribute>
    <xsl:attribute
name="content-width">2.563in</xsl:attribute&
gt;
  </fo:external-graphic>
</fo:block>

<fo:external-graphic>
    <xsl:attribute name="src">
    <xsl:value-of
select="$title.inline.image"/>
    </xsl:attribute>
    <xsl:attribute
name="content-width">0.25in</xsl:attribute&g
t;
    <xsl:attribute
name="width">0.25in</xsl:attribute>
    <xsl:attribute
name="height">0.236in</xsl:attribute>
  </fo:external-graphic>
  <xsl:text> </xsl:text>

  </fo:block>
</xsl:template>


Regards,
Jeff Powanda

-----Original Message-----
From: Bob Stayton [mailto:bobssagehill.net]
Sent: Tuesday, May 01, 2007 1:05 PM
To: Jeff Powanda; docbook-appslists.oasis-open.org
Subject: Re: [docbook-apps]
table.of.contents.title.page.recto
formatting not working

OK, but I'm not clear how it worked in FOP 0.25 if there is
no
fo:external-graphic reference to the image file in the FO
output.
Something else must have changed on the stylesheet side,
no?

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobssagehill.net


----- Original Message ----- 
From: "Jeff Powanda" <jpowandavocera.com>
To: "Bob Stayton" <bobssagehill.net>;
<docbook-appslists.oasis-open.org>
Sent: Tuesday, May 01, 2007 10:34 AM
Subject: RE: [docbook-apps]
table.of.contents.title.page.recto
formatting
not working



Sorry for not being more specific. The graphic is missing
from the FO
file.

Regards,
Jeff Powanda


-----Original Message-----
From: Bob Stayton [mailto:bobssagehill.net]
Sent: Monday, April 30, 2007 11:46 PM
To: Jeff Powanda; docbook-appslists.oasis-open.org
Subject: Re: [docbook-apps]
table.of.contents.title.page.recto
formatting not working

Can you be more specific about what "not working"
means?  Does the
expected fo:external-graphic element appear in your FO file?
 That would
indicate whether the problem is with the customization layer
or FOP.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobssagehill.net



----- Original Message ----- 
From: Jeff Powanda <mailto:jpowandavocera.com>
To: docbook-appslists.oasis-open.org
Sent: Monday, April 30, 2007 6:13 PM
Subject: [docbook-apps] table.of.contents.title.page.recto
formatting not working


In my customization layer, I use the following template to
format the TOC titlepage for PDF output. It's not working.



The tools I'm using are DocBook XSL 1.72 and FOP 0.93. The
same
"table.of.contents.titlepage.recto" template
worked fine with FOP 0.25.
Anyone know what's wrong?



<xsl:template
name="table.of.contents.titlepage.recto">



        <!-- Insert buckshot graphic at top of TOC title
page.
-->

            <fo:block  
space-before.optimum="-0.6in"
space-before.minimum="-0.6in"
space-before.maximum="-0.6in"

                                   
space-after.optimum="0.25in"
space-after.minimum="0.25in"
space-after.maximum="0.25in">

                  <xsl:attribute
name="text-align">right</xsl:attribute>

                  <fo:external-graphic>

                  <xsl:attribute
name="src">

                        <xsl:value-of
select="$chapter.titlepage.image"/>

                  </xsl:attribute>

                        <xsl:attribute
name="height">1.271in</xsl:attribute>

                  <xsl:attribute
name="width">2.563in</xsl:attribute>

                  <xsl:attribute
name="content-width">2.563in</xsl:attribute&
gt;

                  </fo:external-graphic>

             </fo:block>



  <fo:block xmlns:fo="http://www.w3
.org/1999/XSL/Format"


xsl:use-attribute-sets="table.of.contents.titlepage.rec
to.style"

                 text-align="left"

                
margin-left="{$title.margin.left}"



                 font-size="18pt"

                 font-family="{$title.fontset}"

                 font-weight="bold"

                 start-indent="0in">



         <!-- Put 4-dots graphic before TOC title.
-->


            <fo:external-graphic>

            <xsl:attribute name="src">

                  <xsl:value-of
select="$title.inline.image"/>

            </xsl:attribute>

            <xsl:attribute
name="content-width">0.25in</xsl:attribute&g
t;

            <xsl:attribute
name="width">0.25in</xsl:attribute>

            <xsl:attribute
name="height">0.236in</xsl:attribute>

            </fo:external-graphic>



            <xsl:text> </xsl:text>

            <xsl:call-template
name="gentext">

                  <xsl:with-param name="key"
select="'TableofContents'"/>

            </xsl:call-template>

  </fo:block>

</xsl:template>



Regards,

Jeff Powanda





------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org





------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )