Copyright Page

Here should go questions about transforming XML with XSLT and FOP.
gwhite
Posts: 70
Joined: Fri Jul 27, 2012 1:46 am

Copyright Page

Post by gwhite »

I've been trying to figure out how to make a copyright page print on the obverse side (left page) of the title page of a PDF, with some text--which could be hard-coded in the front-matter_1.0.xsl file if necessary, or wherever, you know, in the custom.xsl file presumably using code from that front-matter_1.0.xsl file--and using some metadata as well from the front-matter attributes set up in the book file. Is this easy to do? I'm not seeing any discussion of this specific subject here or in the yahoo dita users group.

What I want is simply a copyright page that says something like:

First Edition
Copyright (c) 2012 My Company, Inc.
All Rights Reserved

Thanks for any suggestions.

Gary
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Copyright Page

Post by Radu »

Hi Gary,

Maybe in the front-matter_1.0.xsl in the xsl template <xsl:template name="createFrontMatter_1.0"> before the <fo:block xsl:use-attribute-sets="__frontmatter"> you could add your own block like:

Code: Select all

 
...............
<fo:flow flow-name="xsl-region-body">
<fo:block break-after="page" text-align="center">THIS IS MY COPYRIGHT......</fo:block>
<fo:block xsl:use-attribute-sets="__frontmatter">.....
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
gwhite
Posts: 70
Joined: Fri Jul 27, 2012 1:46 am

Re: Copyright Page

Post by gwhite »

Hi Radu,

Thanks for your response. Your suggestion didn't work exactly as intended. The problem is that the break-after attribute needs to come in an <fo:block> statement before the first line of copyright info. It's a very simple solution in that you can slip the code just before the commented-out call for the Preface. Here is what worked for me, with some of the surrounding lines to show exactly where I placed it. "&#169;" is the ascii code for the copyright symbol, of course.

Code: Select all


                    <!-- set the subtitle -->
<xsl:apply-templates select="$map//*[contains(@class,' bookmap/booktitlealt ')]"/>

<fo:block xsl:use-attribute-sets="__frontmatter__owner">
<xsl:apply-templates select="$map//*[contains(@class,' bookmap/bookmeta ')]"/>
</fo:block>

<!-- Insert copyright page -->

<fo:block break-after="page"></fo:block>
<fo:block text-align="left">First Edition</fo:block>
<fo:block text-align="left">Copyright &#169; 2012 My Company, Inc.</fo:block>
<fo:block text-align="left">All Rights Reserved</fo:block>
<fo:block xsl:use-attribute-sets="__frontmatter">
</fo:block>

<!-- End insert copyright page -->


<!-- xsl:call-template name="createPreface"/ -->
</fo:block>
</fo:flow>
</fo:page-sequence>
Thanks again for helping me understand the issues.

Gary
Post Reply