[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Issues with programlistingco
Bob: that's what I ended up doing. I was just worried that I had missed something that was causing the errors. Carlos On Apr 27, 2012, at 3:10 PM, Bob Stayton wrote: > Hi Carlos, > > The version using the <co> elements should now work using the stylesheet snapshot that has the fixes that I just checked in. BTW, there was one typo in your example. The callout element referencing author used "arearef" when it must be "arearefs" (even with a single reference). Also, putting a programlisting inside a programlistingco without an areaspec is not valid, so just delete the programlistingco wrapper on that one. > > I cannot get the version with areaspec to work. A programlistingco element with areaspec cannot be handled with straight XSLT. DocBook XSL provides a Java extension function that must be used to get the callouts appearing in the code listing. That process is described here: > > http://www.sagehill.net/docbookxsl/AnnotateListing.html#CalloutAreaSpec > > Also, I believe the example provided by The Definitive Guide is not usable. It does not specify a 'units' attribute, so it isn't clear what a value of 'coords' means. Also, the supported values of coords in the extension do not support a single line number. I changed the attributes to what I thought would work, but it doesn't seem to work, and the error messages are not helpful. I would recommend you just use programlisting and co. 8^) > > Bob Stayton > Sagehill Enterprises > bobs@sagehill.net > > > ----- Original Message ----- From: "Carlos Araya" <carlos.araya@gmail.com> > To: <docbook-apps@lists.oasis-open.org> > Sent: Wednesday, April 25, 2012 1:58 PM > Subject: [docbook-apps] Issues with programlistingco > > hello: > > I've tried both of the examples below to generate a callout programlisting in my ebook. > > The first version uses areaspec following the example on TDG (http://docbook.org/tdg51/en/html/programlistingco.html) and is located at https://gist.github.com/2493163 > This version doesn't display the callout bugs on the programlisting. > > The second version I tried is a modification of the co tag from TDG (http://docbook.org/tdg51/en/html/co.html) and is located at https://gist.github.com/2493179 > This version displays the callout bugs but fails epub validation with the following error > > [java] ERROR: docbook-howto.epub/OEBPS/ch02.xhtml(10,138): 'OEBPS/images/callouts/5.png': referenced resource exists, but not declared in the OPF file > [java] ERROR: docbook-howto.epub/OEBPS/ch02.xhtml(12,84): 'OEBPS/images/callouts/6.png': referenced resource exists, but not declared in the OPF file > [java] ERROR: docbook-howto.epub/OEBPS/ch02.xhtml(26,156): 'xml.declaration': fragment identifier is not defined in 'OEBPS/ch02.xhtml' > [java] ERROR: docbook-howto.epub/OEBPS/ch02.xhtml(26,482): 'docbook.root': fragment identifier is not defined in 'OEBPS/ch02.xhtml' > [java] ERROR: docbook-howto.epub/OEBPS/ch02.xhtml(26,866): 'default.namespace': fragment identifier is not defined in 'OEBPS/ch02.xhtml' > [java] ERROR: docbook-howto.epub/OEBPS/ch02.xhtml(26,1184): 'xlink.namespace': fragment identifier is not defined in 'OEBPS/ch02.xhtml' > [java] ERROR: docbook-howto.epub/OEBPS/ch02.xhtml(26,1848): 'chapter.title': fragment identifier is not defined in 'OEBPS/ch02.xhtml' > [java] ERROR: docbook-howto.epub/OEBPS/ch02.xhtml(26,1957): 'chapter.paragraph': fragment identifier is not defined in 'OEBPS/ch02.xhtml' > > I am also getting consistent validation warnings regarding two of the callout images not being added to the package.opf file > > [java] WARNING: docbook-howto.epub: item (OEBPS/images/callouts/6.png) exists in the zip file, but is not declared in the OPF file > [java] WARNING: docbook-howto.epub: item (OEBPS/images/callouts/5.png) exists in the zip file, but is not declared in the OPF file > > The file exist and are located in the same directory than the 6 image files that do get added to the opf package. When I add them manually there are no problems. > > The callout section in my customization layer looks like this: > > <xsl:param name="callout.graphics.extension">.png</xsl:param> > <xsl:param name="callout.graphics.path">images/callouts/</xsl:param> > <xsl:param name="callout.graphics" select="1"></xsl:param> > <xsl:param name="callout.list.table" select="1"></xsl:param> > > > Is there something that I'm doing wrong with the programlistingco? WHy would only certain image files get packaged in to the OPF package file? Do I need to recreate the images?
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]