[docbook-apps] Company logo in title page (non-standard, I already RTFM)
Hello, I am having a great deal of difficulty getting a solution to my problem here and I'm hoping this list can help. I need to add our company logo to our title page in PDF output, and I have a strange set of requirements. My collection of book documents does not currently have a mediaobject in the bookinfo section, and I can't add it to the source files for compatibility with our FOSI production system. I'm using the titlepage.templates.xml conversion system, and I have everything the way I want without the graphic. If I add the mediaobject to my source file, the title page looks exactly the way I want it; but, like I said before, I can't keep it there because then I'll have two identical graphics there when the FOSI production system builds the PDFs. So, here is my question: can I use a template to add a static mediaobject to the bookinfo element before the title page xslt happens? I added a small template to my customization layer that sort of works (it adds the mediaobject, but then FOP crashes when it tries to make the PDF). Here is the template I added: xsl:template match=@* | node() xsl:copy xsl:apply-templates select=@* | node()/ /xsl:copy /xsl:template xsl:template match=bookinfo bookinfo mediaobject imageobject imagedata fileref=http://swpubs.us.cray.com/entities/craylogo.new.gif; scale=133/ /imageobject /mediaobject xsl:apply-templates select=@* | */ /bookinfo /xsl:template Thanks in advance! Eric Nordlund Customer Documentation and Training Cray Inc. 901 5th Ave Seattle, WA 98164 (206)701-2232 - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] Company logo in title page (non-standard, I already RTFM)
Hi Eric, On 04/04/2013 01:43 PM, Eric Nordlund wrote: So, here is my question: can I use a template to add a static mediaobject to the bookinfo element before the title page xslt happens? I added a small template to my customization layer that sort of works (it adds the mediaobject, but then FOP crashes when it tries to make the PDF). Here is the template I added: [...] What you describe sounds like a two-stage workflow, where you first process your document one time, inserting a mediaobject, then take the resulting XML file and process that a second time to generate FO output from that. That should indeed work. What doesn't work is to inject a mediaobject in the generated FO (since then it wouldn't be valid FO any longer). However, I wonder why you want to inject a mediaobject in the first place, instead of a fo:graphic. Making the graphics part of the stylesheet allows you to not having to change all your document sources and still get the desired graphics into the pdf, when using that custom stylesheet. Stefan -- ...ich hab' noch einen Koffer in Berlin... - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
[docbook-apps] Re: [docbook] Arbitrarily start section numbering?
[moving this over to the docbook-apps mailing list where stylesheet issues are discussed] Yes, this can be done with a small customization: xsl:param name=start.numbering.at select=0/ xsl:template match=section mode=label.markup xsl:choose xsl:when test=$start.numbering.at != 0 and not(ancestor::section) xsl:value-of select=$start.numbering.at/ /xsl:when xsl:otherwise xsl:apply-imports/ /xsl:otherwise /xsl:choose /xsl:template The 'label.markup' mode is used to generate a number for an element. In this case, it only applies to top level sections. Or you could test to see if it is the root element by using not(ancestor::*). Nested sections are numbered from there because each level of section number is generated by first computing the ancestor numbers, so the first subsection would be 6.2.1. Bob Stayton Sagehill Enterprises b...@sagehill.net -- From: Joshua Wulf jw...@redhat.com Sent: Wednesday, April 03, 2013 10:02 PM To: docb...@lists.oasis-open.org Subject: [docbook] Arbitrarily start section numbering? Can I give an argument to xsltproc to have the docbook style sheets transform my section with an arbitrary section number, rather than starting at 1? I'd like to be able to do this, in essence: xsltproc --output myrenderedsection.html \ --stringparam start.numbering.at 6.2 \ html/docbook.xsl section.xml - Josh - To unsubscribe, e-mail: docbook-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-h...@lists.oasis-open.org - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
[docbook-apps] Epub2 and SVG
I am curious about other people's approach to using SVG in Epub2. We rely heavily on SVG for our Docbook to pdf flow and Fop is rendering SVG (mostly exported from Visio) without major problems. However, all the epub readers we have tried do a horrible job of rendering SVG. We have tried Nook for Android, Aldiko, Mantano, EZpdf, and Readium. Azardi is the only one that produces usable rendering. Is the best option to convert to png and use that? That would be a shame. Another downside I noticed is that all epub readers are much, much slower than pdf readers. MT --
[docbook-apps] xrefs to title elements don't work
My company has a hundred or so books that were authored with Arbortext's graphic XML editor. I'm having a problem processing these books with XSL-FO because so many of the xrefs in these books are to title elements instead of the parent procedure, section, example, table, etc., elements. Is there a way to make these work in the XSL-FO output? I was thinking I could have a template that could recognize when an xref/@linkend pointed to the id of a title and then change the linkend to the id of the title's parent element, but I don't really know how to do that. Is there another way to do what I need to do? Eric Nordlund Customer Documentation and Training Cray Inc. 901 5th Ave Seattle, WA 98164 (206)701-2232