[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] collab elements: not present in FO
Hi Michael,Getting closer. Your customization layer needs to include the namespace declaration for fo:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> That's why you got a plain <block> element, which FOP reported as an error.Regarding the verso titlepage, it seems that there is a separate template that handles the authorgroup for verso title pages. In titlepage.templates.xml it specifies:
<t:titlepage-content t:side="verso"> ... <authorgroup t:named-template="verso.authorgroup"/>The stylesheet uses a template named 'verso.authorgroup' for that page, and that template is located in fo/titlepage.xsl. Copy that template to your customization layer and change it to add processing of collab elements in mode="titlepage.mode":
<xsl:template name="verso.authorgroup"> ... <xsl:apply-templates select="othercredit" mode="titlepage.mode"/> <xsl:apply-templates select="collab" mode="titlepage.mode"/> </xsl:template> That should do it. Bob Stayton Sagehill Enterprises bobs@sagehill.net----- Original Message ----- From: "michael mclaughlin" <m_mclaug@yahoo.co.uk>
To: <docbook-apps@lists.oasis-open.org>; "Bob Stayton" <bobs@sagehill.net> Sent: Tuesday, September 27, 2011 5:42 AM Subject: Re: [docbook-apps] collab elements: not present in FOUsing the 1.76.1 stylesheets, the default fo/titlepage.templates.xsl, xsltproc and the following simple customization layer which includes your workaround:
--- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:import href="docbook-xsl-1.76.1/fo/docbook.xsl"/> <!-- Collabname fix --> <xsl:template match="collabname"> <fo:block> <xsl:apply-templates/> </fo:block> </xsl:template> </xsl:stylesheet> ----- XML markup is: <authorgroup> <author> <firstname>Adam</firstname> <surname>Adams</surname> </author> <collab> <collabname>Jenny Jones</collabname> </collab> </authorgroup> ----- The default title page template for a book has the following authorgroup elements: <authorgroup/> on the recto (1st) page <authorgroup t:named-template="verso.authorgroup"/> on the verso (2nd) page ------ RESULTS:1) The collabname element on page 1 is rendered to the FO file, but without the fo: namespace.
<block>Jenny Jones</block>. FOP gives the following error:WARNING: Unknown formatting object "{}block" encountered (a child of fo:block}. (See position 2:46768)
2) The collabname element on page 2 is not rendered at all to the FO file. ---- Should I file this as a bug? --- On Mon, 26/9/11, Bob Stayton <bobs@sagehill.net> wrote:
From: Bob Stayton <bobs@sagehill.net> Subject: Re: [docbook-apps] collab elements: not present in FO To: "michael mclaughlin" <m_mclaug@yahoo.co.uk>, docbook-apps@lists.oasis-open.org Date: Monday, 26 September, 2011, 19:19 Hi, I will ask again: are you using a customization layer stylesheet or the stock DocBook XSL stylesheet (the fo/docbook.xsl from the distribution). It works when I use the stock fo stylesheet from version 1.76.1. If you are using the stock stylesheet and getting those results, we'll need to investigate further. Bob Stayton Sagehill Enterprises bobs@sagehill.net----- Original Message ----- From: "michael mclaughlin" <m_mclaug@yahoo.co.uk>To: <docbook-apps@lists.oasis-open.org>; "Bob Stayton" <bobs@sagehill.net> Sent: Monday, September 26, 2011 7:10 AM Subject: Re: [docbook-apps] collab elements: not present in FO Your workaround has no affect. Using the following markup: <authorgroup> <author> <firstname>Adam</firstname> <surname>Adams</surname> </author> <collab> <collabname>Jenny Jones</collabname> </collab> </authorgroup> Only the author element is present in the FO output. --- On Sun, 25/9/11, Bob Stayton <bobs@sagehill.net> wrote: > From: Bob Stayton <bobs@sagehill.net> > Subject: Re: [docbook-apps] collab elements: not present in FO > To: "michael mclaughlin" <m_mclaug@yahoo.co.uk>, docbook-apps@lists.oasis-open.org > Date: Sunday, 25 September, 2011, 20:43 > Hi, > Try adding this template to your customization layer for FO > output: > > <xsl:template match="collabname"> > <fo:block> > <xsl:apply-templates/> > </fo:block> > </xsl:template> > > > Bob Stayton > Sagehill Enterprises > bobs@sagehill.net > > > ----- Original Message ----- From: "michael mclaughlin" > <m_mclaug@yahoo.co.uk> > To: <docbook-apps@lists.oasis-open.org> > Sent: Sunday, September 25, 2011 9:47 AM > Subject: Re: [docbook-apps] collab elements: not present in > FO > > > We have been using collab and collabname in markup for the > authorgroup element. > Despite the authorgroup element being present in the FO > front page template, the collab and collabname elements do > not show up on the title page. > > Using FOP 1.0. No errors were generated when creating FO > output. But the collab elements are not present in the FO > file. > > --- On Fri, 23/9/11, Bob Stayton <bobs@sagehill.net> > wrote: > > > From: Bob Stayton <bobs@sagehill.net> > > Subject: Re: [docbook-apps] collab elements: not > present in FO > > To: "mike 675" <m_mclaug@yahoo.co.uk>, > docbook-apps@lists.oasis-open.org > > Date: Friday, 23 September, 2011, 22:16 > > Hi Mike, > > When you run the FO process, the error output should > have > > shown something like this: > > > > "Element collabname in namespace '' encountered in > collab, > > but no template matches." > > > > The error should also have shown up in red on the > title > > page because it seems the FO > > stylesheet does not have a template matching on > collabname, > > and that is a bug. It > > would be nice if you could report that bug to the > > DocBook SourceForge bug tracker. > > > > When you say collab is ignored, I'm wondering if you > are > > working with a customization > > that does something with collab or collabname. Have > > you tested it with the stock > > stylesheets? > > > > Bob Stayton > > Sagehill Enterprises > > bobs@sagehill.net > > > > > > ----- Original Message ----- From: "mike 675" <m_mclaug@yahoo.co.uk> > > To: <docbook-apps@lists.oasis-open.org> > > Sent: Tuesday, September 20, 2011 6:14 AM > > Subject: Re: [docbook-apps] collab elements: not > present in > > FO > > > > > > > > > > Using an alternative markup. > > > HTML output is OK. > > > Only <author> is present in FO. > <collab> > > entries are ignored. > > > > > > <authorgroup> > > > > > > <author><firstname>Andy</firstname><surname>Andrews</surname></author> > > > <collab> > > > <collabname>Peter > > Piper</collabname> > > > </collab> > > > <collab> > > > <collabname>Jenny > > Jones</collabname> > > > </collab> > > > </authorgroup> > > > > > > > > > mike 675 wrote: > > >> > > >> Using 1.76.1 stylesheets, exporting to FO. > > >> > > >> The <collab> elements in the following > > markup do not show up in the .fo > > >> file. > > >> > > >> <bookinfo> > > >> .... > > >> <authorgroup role="Primary"> > > >> <author> > > >> > > <firstname>Andy</firstname> > > >> > > <surname>Andrews</surname> > > >> </author> > > >> </authorgroup> > > >> <authorgroup > > role="Contributing"> > > >> <collab> > > >> > > <collabname>Jenny > > James</collabname> > > >> </collab> > > >> </authorgroup> > > >> <authorgroup > > role="Other"> > > >> <collab> > > >> > > <collabname>Mike > > Michaels</collabname> > > >> </collab> > > >> </authorgroup> > > >> </bookinfo> > > >> > > > > > > -- > View this message in context: > > > http://old.nabble.com/collab-elements%3A-not-present-in-FO-tp32471247p32501067.html > > > Sent from the docbook apps mailing list archive > at > > Nabble.com. > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > > > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org > > > > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]