[docbook-apps] website and javascript
Hi, I use website for http://www.randspringer.de and I'm really happy with it. I process the XML-files with xsltproc. However to include some raw javascript code I usually write in the XML something like para role=foo ... /para and process the generated HTML pages with a perl command to do some substitutions for the foo-para . All this is done in a Makefile. And with the time this post processing becomes more and more Is there a way to include raw HTML/Javascript already in the XML ? Or how do other people such tasks ? Best regards, Thomas -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [docbook-apps] Generating font metrics requires Jakarta Commons Logging
That's cool -- I didn't think to try to remove the xercesImpl and xalan jar files since they were originally required. BTW, I'm finding your book extremely useful Bob. TGM On 4/18/07, Bob Stayton [EMAIL PROTECTED] wrote: Hi, Actually, I have found that you don't need all of those jar file (although including them is not harmful). I can generate the metrics with this minimum set: java -cp ../fop-0.93/build/fop.jar;\ ../fop-0.93/lib/commons-logging-1.0.4.jar \ ../fop-0.93/lib/commons-io-1.1.jar;\ ../fop-0.93/lib/serializer-2.7.0.jar\ org.apache.fop.fonts.apps.TTFReader -enc ansi \ /WINDOWS/FONTS/GARA.TTF lib/garamond.xml Bob Stayton Sagehill Enterprises DocBook Consulting [EMAIL PROTECTED] - Original Message - From: T.G. Mutato [EMAIL PROTECTED] To: docbook-apps@lists.oasis-open.org Sent: Tuesday, April 17, 2007 2:14 PM Subject: [docbook-apps] Generating font metrics requires Jakarta Commons Logging On a Win32 system, I've found with FOP 0.93 that the Generate a FOP font metrics file instructions for FOP 0.20.5 in DocBook XSL: The Complete Guide don't work as is: java -cp ../fop-0.20.5/build/fop.jar;\ ../fop-0.20.5/lib/xercesImpl.jar;../fop-0.20.5/lib/xalan.jar \ org.apache.fop.fonts.apps.TTFReader \ -enc ansi \ /WINDOWS/FONTS/GARA.TTF lib/garamond.xml Even when updating the directory names this produces the error: Exception in thread main java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory Adding the Commons Logging library, Commons IO library, and Serializer library seems to resolve this. So updating the directory names and version numbers and adding the new jar files gives us: java -cp ../fop-0.93/build/fop.jar;\ ../fop-0.93/lib/xercesImpl-2.7.1.jar;\ ../fop-0.93/lib/xalan-2.7.0.jar;\ ../fop-0.93/lib/commons-logging-1.0.4.jar \ ../fop-0.93/lib/commons-io-1.1.jar; ../fop-0.93/lib/serializer-2.7.0.jar org.apache.fop.fonts.apps.TTFReader -enc ansi \ /WINDOWS/FONTS/GARA.TTF lib/garamond.xml Just in case someone else finds this useful... TGM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [docbook-apps] Font size changes in author and affiliation
Title: Re: [docbook-apps] Font size changes in author and affi Thanks Bob, now it uses my customization, BUT the affiliation appears twice, the first time large large and blue, the second small and green. It seems that xsl:apply-templates select=. mode=titlepage.mode/ outputs both the author and the affiliation. I think I need to say select=author and not author/affiliation somehow. Ron ?xsl version=1.0 ? xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform version=1.0 xmlns:fo=http://www.w3.org/1999/XSL/Format xsl:import href=/Applications/Utilities/oxygen/8.1/oxygen/frameworks/docbook/xsl/fo/docbook.xsl / xsl:param name=xep.extensions select =1 / xsl:template match=processing-instruction('lb') fo:block/ /xsl:template xsl:template match=authorgroup mode=book.titlepage.recto.mode fo:wrapper xsl:if test=@id xsl:attribute name=idxsl:value-of select=@id//xsl:attribute /xsl:if xsl:apply-templates mode=book.titlepage.recto.mode/ /fo:wrapper /xsl:template xsl:template match=author mode=book.titlepage.recto.mode fo:block font-size=23pt color=blue space-before=20pt keep-with-next.within-column=always xsl:apply-templates select=. mode=titlepage.mode/ /fo:block fo:block font-size=12pt color=green space-before=18pt xsl:apply-templates select=affiliation mode=titlepage.mode/ /fo:block /xsl:template /xsl:stylesheet Ah, that's because you don't have a customization of authorgroup at the same level also. By default, authorgroup is handled by the template with match=authorgroup mode=titlepage.mode in titlepage.xsl, and it processes its children in mode=titlepage.mode, so your custom templates are bypassed. If you add a template like this it should work: xsl:template match=authorgroup mode=book.titlepage.recto.mode fo:wrapper xsl:if test=@id xsl:attribute name=idxsl:value-of select=@id//xsl:attribute /xsl:if xsl:apply-templates mode=book.titlepage.recto.mode/ /fo:wrapper /xsl:template Bob Stayton Sagehill Enterprises DocBook Consulting [EMAIL PROTECTED] -- Ron Catterall, Phd, DSc email: [EMAIL PROTECTED] Prolongacion de Hidalgo 140 http://catterall.net/ San Felipe del Agua tel: +52 951 520 1821 Oaxaca 68020 Mexico fax: +1 530 348 8309 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [docbook-apps] Font size changes in author and affiliation
Title: Re: [docbook-apps] Font size changes in author and affi Found a way around this duplication: output the firstname, othername and surname separately, but is this the best way? Still two minor problems: 1. need to center the author with 3 non-breaking spaces at end of surname. Messy! There must be better way. 2. The spaces between the parts of the name are too big - haven't found a way around this yet. /xsl:template xsl:template match=authorgroup mode=book.titlepage.recto.mode fo:wrapper xsl:if test=@id xsl:attribute name=idxsl:value-of select=@id//xsl:attribute /xsl:if xsl:apply-templates mode=book.titlepage.recto.mode/ /fo:wrapper /xsl:template xsl:template match=author mode=book.titlepage.recto.mode fo:block font-size=20.736pt color=blue space-before=8pt keep-with-next.within-column=always ?? xsl:apply-templates select=firstname mode=titlepage.mode/ ?? xsl:apply-templates select=othername mode=titlepage.mode/ ?? xsl:apply-templates select=surname mode=titlepage.mode/ !-- ?? xsl:apply-templates select=. mode=titlepage.mode/ -- /fo:block fo:block font-size=14.4pt color=green space-before=8pt ?? xsl:apply-templates select=affiliation mode=titlepage.mode/ /fo:block /xsl:template xsl:template match=author mode=titlepage.mode fo:block xsl:call-template name=anchor/ xsl:call-template name=person.name/ xsl:if test=affiliation/orgname xsl:text /xsl:text xsl:apply-templates select=affiliation/orgname mode=titlepage.mode/ /xsl:if xsl:if test=email|affiliation/address/email xsl:text /xsl:text xsl:apply-templates select=(email|affiliation/address/email)[1]/ /xsl:if /fo:block /xsl:template xsl:template match=authorgroup mode=book.titlepage.recto.auto.mode fo:block xmlns:fo=http://www.w3.org/1999/XSL/Format xsl:use-attribute-sets=book.titlepage.recto.style space-before=1.8in xsl:apply-templates select=. mode=book.titlepage.recto.mode/ /fo:block /xsl:template /xsl:stylesheet Thanks Bob, now it uses my customization, BUT the affiliation appears twice, the first time large large and blue, the second small and green. It seems that xsl:apply-templates select=. mode=titlepage.mode/ outputs both the author and the affiliation. I think I need to say select=author and not author/affiliation somehow. Ron ?xsl version=1.0 ? xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform version=1.0 xmlns:fo=http://www.w3.org/1999/XSL/Format xsl:import href=/Applications/Utilities/oxygen/8.1/oxygen/frameworks/docbook/xsl/fo/docbook.xsl / xsl:param name=xep.extensions select =1 / xsl:template match=processing-instruction('lb') fo:block/ /xsl:template xsl:template match=authorgroup mode=book.titlepage.recto.mode fo:wrapper xsl:if test=@id xsl:attribute name=idxsl:value-of select=@id//xsl:attribute /xsl:if xsl:apply-templates mode=book.titlepage.recto.mode/ /fo:wrapper /xsl:template xsl:template match=author mode=book.titlepage.recto.mode fo:block font-size=23pt color=blue space-before=20pt keep-with-next.within-column=always xsl:apply-templates select=. mode=titlepage.mode/ /fo:block fo:block font-size=12pt color=green space-before=18pt xsl:apply-templates select=affiliation mode=titlepage.mode/ /fo:block /xsl:template /xsl:stylesheet Ah, that's because you don't have a customization of authorgroup at the same level also. By default, authorgroup is handled by the template with match=authorgroup mode=titlepage.mode in titlepage.xsl, and it processes its children in mode=titlepage.mode, so your custom templates are bypassed. If you add a template like this it should work: xsl:template match=authorgroup mode=book.titlepage.recto.mode fo:wrapper xsl:if test=@id xsl:attribute name=idxsl:value-of select=@id//xsl:attribute /xsl:if xsl:apply-templates mode=book.titlepage.recto.mode/ /fo:wrapper /xsl:template Bob Stayton Sagehill Enterprises DocBook Consulting [EMAIL PROTECTED] -- Ron Catterall, Phd, DSc email: [EMAIL PROTECTED] Prolongacion de Hidalgo 140 http://catterall.net/ San Felipe del Agua tel: +52 951 520 1821 Oaxaca 68020 Mexico fax: +1 530 348 8309 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ron Catterall, Phd, DSc email: [EMAIL PROTECTED] Prolongacion de Hidalgo 140 http://catterall.net/ San Felipe del Agua tel: +52 951 520 1821 Oaxaca 68020 Mexico fax: +1 530 348 8309 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[docbook-apps] table width problem with docbook 4.12, dbxsl 1.72.0 and FOP 0.93
I'm having a problem with DocBook (CALS) tables not being formatted correctly by the combination of the xslt stylesheets and FOP. The versions are: Framemaker: 7.2 DocBook: 4.12 (I know, but this is the DocBook application that ships with Frame 7.2, and don't get me started on that.) DocBook stylesheets: docbook-xsl-1.72.0 FOP: 0.93 Java: jre1.6.0 Windows XP I set these parameters: xsl:param name=default.table.width select='5in'/xsl:param xsl:param name=tablecolumns.extension select='1'/xsl:param xsl:param name=fop1.extensions select='1'/xsl:param xsl:attribute-set name=table.properties xsl:attribute name=keep-together.within-columnauto/xsl:attribute /xsl:attribute-set The problem is that the outer ruling on some tables extends too far to the right, beyond the row rulings and contents. See the attached png file for an example. The only FOP errors I get are warnings about an unresolved id reference that I don't believe is related to this problem. I can edit the .fo file, add up the column-width attributes and give this sum as the the value of the width attribute (in place of 100%) on the fo:table element and then the table will format correctly, but this would make for some fairly gnarly post-processing. I think I saw someone describing a similar problem on one of the mailing lists, but the suggestions didn't seem applicable. I'm aware of this posting: http://sourceware.org/ml/docbook-apps/2001-q4/msg00517.html but adding PIs with an absolute table width on a per table basis isn't a viable solution here. Any suggestions would be appreciated. Thanks. The XML source for the test file is as follows: chapter titleA Chapter/title sect1titleA Sect1/title paraaslkdjfal slasjk laskdj lskjdf lskjf/para table frame = all colsep = 1 rowsep = 1titlea table/title tgroup cols = 3 colsep = 1 rowsep = 1 colspec colnum = 1 colname = 1 colwidth = 1.507in/ colspec colnum = 2 colname = 2 colwidth = 2.482in/ colspec colnum = 3 colname = 3 colwidth = 1.011in/ thead row rowsep = 1 entry colname = 1Foo and Bar/entry entry colname = 2Language or Function/entry entry colname = 3Command/entry /row /thead tbody row rowsep = 1 entry colname = 1Apple/entry entry colname = 2a/entry entry colname = 3/entry /row row rowsep = 1 entry colname = 1Orange/entry entry colname = 2/entry entry colname = 322/entry /row row rowsep = 1 condition = nonpvf entry colname = 1Banana/entry entry colname = 2cc/entry entry colname = 33/entry /row row rowsep = 1 condition = nonpvf entry colname = 1Plantain/entry entry colname = 2ddd/entry entry colname = 3/entry /row row rowsep = 1 condition = nonpvf entry colname = 1AcerolaindextermprimaryCompilers/primarysecondaryPGC++/secondary/indexterm/entry entry colname = 2eee /entry entry colname = 3/entry /row row rowsep = 1 entry colname = 1Watermelon/entry entry colname = 2fff/entry entry colname = 3/entry /row row rowsep = 0 entry colname = 1KiwiindextermprimaryTools/primarysecondaryPGPROF/secondary/indexterm/entry entry colname = 2gg/entry entry colname = 3777/entry /row /tbody /tgroup/table parasldkflskf/para table frame = all colsep = 1 rowsep = 1title id = BABIBJJCBanana Options/title tgroup cols = 8 colsep = 1 rowsep = 1 colspec colnum = 1 colname = 1 colwidth = 1.413in/ colspec colnum = 2 colname = 2 colwidth = 0.719in/ colspec colnum = 3 colname = 3 colwidth = 0.541in/ colspec colnum = 4 colname = 4 colwidth = 0.531in/ colspec colnum = 5 colname = 5 colwidth = 0.562in/ colspec colnum = 6 colname = 6 colwidth = 0.561in/ colspec colnum = 7 colname = 7 colwidth = 0.561in/ colspec colnum = 8 colname = 8 colwidth = 1.171in/ thead row rowsep = 1 entry colname = 1Peel/entry entry colname = 22-bit/entry entry colname = 34-bit/entry entry colname = 48-bit/entry entry colname = 516-bit/entry entry colname = 632-bit/entry entry colname = 764-bit/entry entry colname = 8United Fruitcake/entry /row /thead tbody row rowsep = 1 entry colname = 1Zipper/entry entry colname = 2para/para/entry entry colname = 3para/para/entry entry colname = 4para/para/entry entry colname = 5para/para/entry entry colname = 6paraX/para/entry entry colname = 7para/para/entry entry colname = 8paraX/para/entry /row row rowsep = 1 entry colname = 1Velcro/entry entry colname = 2paraX/para/entry entry colname = 3paraX/para/entry entry colname = 4para/para/entry entry colname = 5para/para/entry entry colname = 6paraX/para/entry entry colname = 7para/para/entry entry colname = 8X/entry /row row rowsep = 1 entry colname = 1paraLacing/para/entry entry colname = 2paraX/para/entry entry colname = 3paraX/para/entry entry colname = 4paraX/para/entry entry colname = 5para/para/entry entry colname = 6paraX/para/entry entry colname = 7paraX/para/entry entry colname = 8X/entry /row row rowsep = 0 entry colname = 1Buttons/entry entry colname = 2paraX/para/entry entry colname = 3paraX/para/entry