|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
header & footer in custom title pageI have successfully added a custom page after the book.titlepage.
It is called readme.titlepage Since I did not want headers & footers in the titlepage, i was not generating header/footer content based on this condition. <xsl:when test = "$pageclass = 'titlepage' and $gentext-key = 'book' and $sequence = 'first'"> <!-- No, book titlepages have no headers at all --> </xsl:when> But the new page: readme.titlepage does not have a header. I am unable to find suitable test to allow new page (recto & verso) fail in the 'test' above. Thanks, ~spr ~spr |
|
|
Troubles publishing SVG with FO-XSLHello,
I'm having troubles rendering equations in SVG format using the FO-XSL. I'm transforming using Oxygen 9.1 and it is supposed that it provides the Batik library installed and referenced (via CLASSPATH). Is anybody that uses this tool having success for rendering SVG for FOs? How should I install Batik (and which "Batik.jar" I should install) in order to perform the transformation from command line (outside of Oxygen). Thank you very much. Pedro No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.19.18/1255 - Release Date: 01/02/2008 9:59 --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@... For additional commands, e-mail: docbook-apps-help@... |
|
|
Re: header & footer in custom title pageCan you provide some more information about how you are creating your extra
pages? Are you creating a new page-sequence with page master-name 'titlepage'? If so, I don't think there is enough information in the context of the header/footer content templates to distinguish between them. You might need to add a new fo:page-sequence-master with a different master-name, and use that for your extra pages. Then the test won't match on 'titlepage' and you should get headers and footers. You don't need to add new fo:simple-page-masters, you can just reuse the existing ones for titlepage but with a new master-name. Put the declaration in a template named 'user.pagemasters', and customize the template named 'select.user.pagemaster', as described here: http://www.sagehill.net/docbookxsl/PageDesign.html Bob Stayton Sagehill Enterprises bobs@... ----- Original Message ----- From: "spr" <spremi@...> To: <docbook-apps@...> Sent: Saturday, February 02, 2008 11:38 AM Subject: [docbook-apps] header & footer in custom title page > > I have successfully added a custom page after the book.titlepage. > It is called readme.titlepage > > Since I did not want headers & footers in the titlepage, i was not > generating header/footer content based on this condition. > > <xsl:when > test = "$pageclass = 'titlepage' and > $gentext-key = 'book' and > $sequence = 'first'"> > <!-- No, book titlepages have no headers at all --> > </xsl:when> > > But the new page: readme.titlepage does not have a header. > I am unable to find suitable test to allow new page (recto & verso) fail > in > the 'test' above. > > Thanks, > ~spr > > -- > View this message in context: > http://www.nabble.com/header---footer-in-custom-title-page-tp15246374p15246374.html > Sent from the docbook apps mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscribe@... > For additional commands, e-mail: docbook-apps-help@... > > > --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@... For additional commands, e-mail: docbook-apps-help@... |
|
|
Re: Troubles publishing SVG with FO-XSLThe FOP convenience scripts that come with FOP handle adding the Batik.jar.
I successfully processed a document with SVG files using those scripts. Use either "fop" on Linux or "fop.bat" on Windows. You can examine the commands they use to determine how to set up your own command line. Bob Stayton Sagehill Enterprises bobs@... ----- Original Message ----- From: "Pedro Pastor" <pps@...> To: <docbook-apps@...> Cc: <pps@...> Sent: Saturday, February 02, 2008 4:21 PM Subject: [docbook-apps] Troubles publishing SVG with FO-XSL > Hello, > > I'm having troubles rendering equations in SVG format using the FO-XSL. > I'm > transforming using Oxygen 9.1 and it is supposed that it provides the > Batik > library installed and referenced (via CLASSPATH). > > Is anybody that uses this tool having success for rendering SVG for FOs? > How > should I install Batik (and which "Batik.jar" I should install) in order > to > perform the transformation from command line (outside of Oxygen). > > Thank you very much. > Pedro > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.516 / Virus Database: 269.19.18/1255 - Release Date: > 01/02/2008 > 9:59 > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscribe@... > For additional commands, e-mail: docbook-apps-help@... > > > --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@... For additional commands, e-mail: docbook-apps-help@... |
|
|
Re: header & footer in custom title pageBob,
1) I create extra page by custom spec based on "fo/titlepage.templates.xml" <t:titlepage t:element = "readme" t:wrapper = "fo:block"> ... ... </t:titlepage> 2) Also updated the sequence to include: <xsl:call-template name = "page.sequence"> <xsl:with-param name = "master-reference" select = "$titlepage-master-reference" /> <xsl:with-param name = "content"> <fo:block id="r-{$id}"> <xsl:call-template name = "readme.titlepage" /> </fo:block> </xsl:with-param> </xsl:call-template> ~spr
~spr |
|
|
Re: header & footer in custom title pageThis line indicates you are using the 'titlepage' master name for your extra
page: <xsl:with-param name = "master-reference" select = "$titlepage-master-reference" /> That is why your new page sequence behaves like the front title pages. My mail described how to set up an alternative master name to use on those pages, then you can customize them to behave differently. In this case, just naming the master other than 'titlepage' will recover the headers and footers. Bob Stayton Sagehill Enterprises bobs@... ----- Original Message ----- From: "spr" <spremi@...> To: <docbook-apps@...> Sent: Tuesday, February 05, 2008 3:12 AM Subject: Re: [docbook-apps] header & footer in custom title page > > Bob, > > 1) I create extra page by custom spec based on > "fo/titlepage.templates.xml" > > <t:titlepage > t:element = "readme" > t:wrapper = "fo:block"> > ... > ... > </t:titlepage> > > 2) Also updated the sequence to include: > > <xsl:call-template > name = "page.sequence"> > > <xsl:with-param > name = "master-reference" > select = "$titlepage-master-reference" /> > > <xsl:with-param > name = "content"> > <fo:block id="r-{$id}"> > <xsl:call-template > name = "readme.titlepage" /> > </fo:block> > </xsl:with-param> > > </xsl:call-template> > > ~spr > > > Bob Stayton wrote: >> >> Can you provide some more information about how you are creating your >> extra >> pages? Are you creating a new page-sequence with page master-name >> 'titlepage'? If so, I don't think there is enough information in the >> context of the header/footer content templates to distinguish between >> them. >> You might need to add a new fo:page-sequence-master with a different >> master-name, and use that for your extra pages. Then the test won't >> match >> on 'titlepage' and you should get headers and footers. You don't need >> to >> add new fo:simple-page-masters, you can just reuse the existing ones for >> titlepage but with a new master-name. Put the declaration in a template >> named 'user.pagemasters', and customize the template named >> 'select.user.pagemaster', as described here: >> >> http://www.sagehill.net/docbookxsl/PageDesign.html >> >> Bob Stayton >> Sagehill Enterprises >> bobs@... >> >> > > -- > View this message in context: > http://www.nabble.com/header---footer-in-custom-title-page-tp15246374p15287935.html > Sent from the docbook apps mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscribe@... > For additional commands, e-mail: docbook-apps-help@... > > > --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@... For additional commands, e-mail: docbook-apps-help@... |
|
|
Re: header & footer in custom title pageHi Bob,
I tried to follow as per the link you mentioned. But get an exception: SEVERE: Exception javax.xml.transform.TransformerException: java.lang.IllegalStateException: endElement() called for fo:root where there i s no current element. at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197) --------- ; SystemID: file:/D:/wrk/BookTest/docbook-xsl-ns-1.73.2/fo/docbook.xsl; Line#: 219; Column#: 59 javax.xml.transform.TransformerException: java.lang.IllegalStateException: endElement() called for fo:root where there i s no current element. at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2416) --snip--remainder of errors ---snip--- Here is the modification in calling page-master: <xsl:with-param name = "master-reference" select = "readme" /> Here is the template I created: It is essentially a copy of "titlepage" in "fo/pagesetup.xsl" <xsl:template name="user.pagemasters"> <fo:simple-page-master master-name="readme-first" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" margin-left="{$margin.left.inner}" margin-right="{$page.margin.outer}"> <xsl:if test="$axf.extensions != 0"> <xsl:call-template name="axf-page-master-properties"> <xsl:with-param name="page.master">readme-first</xsl:with-param> </xsl:call-template> </xsl:if> <fo:region-body margin-bottom="{$body.margin.bottom}" margin-top="{$body.margin.top}" column-gap="{$column.gap.titlepage}" column-count="{$column.count.titlepage}"> </fo:region-body> <fo:region-before region-name="xsl-region-before-first" extent="{$region.before.extent}" display-align="before"/> <fo:region-after region-name="xsl-region-after-first" extent="{$region.after.extent}" display-align="after"/> </fo:simple-page-master> <fo:simple-page-master master-name="readme-odd" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" margin-left="{$margin.left.inner}" margin-right="{$page.margin.outer}"> <xsl:if test="$axf.extensions != 0"> <xsl:call-template name="axf-page-master-properties"> <xsl:with-param name="page.master">readme-odd</xsl:with-param> </xsl:call-template> </xsl:if> <fo:region-body margin-bottom="{$body.margin.bottom}" margin-top="{$body.margin.top}" column-gap="{$column.gap.titlepage}" column-count="{$column.count.titlepage}"> </fo:region-body> <fo:region-before region-name="xsl-region-before-odd" extent="{$region.before.extent}" display-align="before"/> <fo:region-after region-name="xsl-region-after-odd" extent="{$region.after.extent}" display-align="after"/> </fo:simple-page-master> <fo:simple-page-master master-name="readme-even" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" margin-left="{$margin.left.outer}" margin-right="{$page.margin.inner}"> <xsl:if test="$axf.extensions != 0"> <xsl:call-template name="axf-page-master-properties"> <xsl:with-param name="page.master">readme-even</xsl:with-param> </xsl:call-template> </xsl:if> <fo:region-body margin-bottom="{$body.margin.bottom}" margin-top="{$body.margin.top}" column-gap="{$column.gap.titlepage}" column-count="{$column.count.titlepage}"> </fo:region-body> <fo:region-before region-name="xsl-region-before-even" extent="{$region.before.extent}" display-align="before"/> <fo:region-after region-name="xsl-region-after-even" extent="{$region.after.extent}" display-align="after"/> </fo:simple-page-master> <fo:page-sequence-master master-name="readme"> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference master-reference="blank" blank-or-not-blank="blank"/> <fo:conditional-page-master-reference master-reference="readme-first" page-position="first"/> <fo:conditional-page-master-reference master-reference="readme-odd" odd-or-even="odd"/> <fo:conditional-page-master-reference odd-or-even="even"> <xsl:attribute name="master-reference"> <xsl:choose> <xsl:when test="$double.sided != 0">readme-even</xsl:when> <xsl:otherwise>readme-odd</xsl:otherwise> </xsl:choose> </xsl:attribute> </fo:conditional-page-master-reference> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> </xsl:template> Where could I be going wrong? ~spr
~spr |
|
|
Re: header & footer in custom title pageIs readme inside single quotes inside the double quotes? It must be to be
recognized as a string instead of an element name: > <xsl:with-param > name = "master-reference" > select = "readme" /> select="'readme'" Bob Stayton Sagehill Enterprises bobs@... ----- Original Message ----- From: "spr" <spremi@...> To: <docbook-apps@...> Sent: Tuesday, February 05, 2008 12:40 PM Subject: Re: [docbook-apps] header & footer in custom title page > > Hi Bob, > > I tried to follow as per the link you mentioned. But get an exception: > SEVERE: Exception > javax.xml.transform.TransformerException: java.lang.IllegalStateException: > endElement() called for fo:root where there i > s no current element. > at > org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168) > at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115) > at org.apache.fop.cli.Main.startFOP(Main.java:166) > at org.apache.fop.cli.Main.main(Main.java:197) > > --------- > > ; SystemID: file:/D:/wrk/BookTest/docbook-xsl-ns-1.73.2/fo/docbook.xsl; > Line#: 219; Column#: 59 > javax.xml.transform.TransformerException: java.lang.IllegalStateException: > endElement() called for fo:root where there i > s no current element. > at > org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2416) > > --snip--remainder of errors ---snip--- > > Here is the modification in calling page-master: > <xsl:with-param > name = "master-reference" > select = "readme" /> > > Here is the template I created: > It is essentially a copy of "titlepage" in "fo/pagesetup.xsl" > > <xsl:template name="user.pagemasters"> > <fo:simple-page-master master-name="readme-first" > page-width="{$page.width}" > page-height="{$page.height}" > margin-top="{$page.margin.top}" > margin-bottom="{$page.margin.bottom}" > margin-left="{$margin.left.inner}" > margin-right="{$page.margin.outer}"> > <xsl:if test="$axf.extensions != 0"> > <xsl:call-template name="axf-page-master-properties"> > <xsl:with-param name="page.master">readme-first</xsl:with-param> > </xsl:call-template> > </xsl:if> > <fo:region-body margin-bottom="{$body.margin.bottom}" > margin-top="{$body.margin.top}" > column-gap="{$column.gap.titlepage}" > column-count="{$column.count.titlepage}"> > </fo:region-body> > <fo:region-before region-name="xsl-region-before-first" > extent="{$region.before.extent}" > display-align="before"/> > <fo:region-after region-name="xsl-region-after-first" > extent="{$region.after.extent}" > display-align="after"/> > </fo:simple-page-master> > > <fo:simple-page-master master-name="readme-odd" > page-width="{$page.width}" > page-height="{$page.height}" > margin-top="{$page.margin.top}" > margin-bottom="{$page.margin.bottom}" > margin-left="{$margin.left.inner}" > margin-right="{$page.margin.outer}"> > <xsl:if test="$axf.extensions != 0"> > <xsl:call-template name="axf-page-master-properties"> > <xsl:with-param name="page.master">readme-odd</xsl:with-param> > </xsl:call-template> > </xsl:if> > <fo:region-body margin-bottom="{$body.margin.bottom}" > margin-top="{$body.margin.top}" > column-gap="{$column.gap.titlepage}" > column-count="{$column.count.titlepage}"> > </fo:region-body> > <fo:region-before region-name="xsl-region-before-odd" > extent="{$region.before.extent}" > display-align="before"/> > <fo:region-after region-name="xsl-region-after-odd" > extent="{$region.after.extent}" > display-align="after"/> > </fo:simple-page-master> > > <fo:simple-page-master master-name="readme-even" > page-width="{$page.width}" > page-height="{$page.height}" > margin-top="{$page.margin.top}" > margin-bottom="{$page.margin.bottom}" > margin-left="{$margin.left.outer}" > margin-right="{$page.margin.inner}"> > <xsl:if test="$axf.extensions != 0"> > <xsl:call-template name="axf-page-master-properties"> > <xsl:with-param name="page.master">readme-even</xsl:with-param> > </xsl:call-template> > </xsl:if> > <fo:region-body margin-bottom="{$body.margin.bottom}" > margin-top="{$body.margin.top}" > column-gap="{$column.gap.titlepage}" > column-count="{$column.count.titlepage}"> > </fo:region-body> > <fo:region-before region-name="xsl-region-before-even" > extent="{$region.before.extent}" > display-align="before"/> > <fo:region-after region-name="xsl-region-after-even" > extent="{$region.after.extent}" > display-align="after"/> > </fo:simple-page-master> > > <fo:page-sequence-master master-name="readme"> > <fo:repeatable-page-master-alternatives> > <fo:conditional-page-master-reference master-reference="blank" > blank-or-not-blank="blank"/> > <fo:conditional-page-master-reference > master-reference="readme-first" > page-position="first"/> > <fo:conditional-page-master-reference master-reference="readme-odd" > odd-or-even="odd"/> > <fo:conditional-page-master-reference > odd-or-even="even"> > <xsl:attribute name="master-reference"> > <xsl:choose> > <xsl:when test="$double.sided != 0">readme-even</xsl:when> > <xsl:otherwise>readme-odd</xsl:otherwise> > </xsl:choose> > </xsl:attribute> > </fo:conditional-page-master-reference> > </fo:repeatable-page-master-alternatives> > </fo:page-sequence-master> > > </xsl:template> > > Where could I be going wrong? > > ~spr > > > Bob Stayton wrote: >> >> This line indicates you are using the 'titlepage' master name for your >> extra >> page: >> >> <xsl:with-param >> name = "master-reference" >> select = "$titlepage-master-reference" /> >> >> That is why your new page sequence behaves like the front title pages. >> My >> mail described how to set up an alternative master name to use on those >> pages, then you can customize them to behave differently. In this case, >> just naming the master other than 'titlepage' will recover the headers >> and >> footers. >> >> Bob Stayton >> Sagehill Enterprises >> bobs@... >> >> > > -- > View this message in context: > http://www.nabble.com/header---footer-in-custom-title-page-tp15246374p15299061.html > Sent from the docbook apps mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscribe@... > For additional commands, e-mail: docbook-apps-help@... > > > --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@... For additional commands, e-mail: docbook-apps-help@... |
|
|
Re: header & footer in custom title pageYes. the quotes got it working.
~:) spr
~spr |
| Free embeddable forum powered by Nabble | Forum Help |