OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Issues with programlistingco


I need to retract that success announcement. It seems the <span> element generated by the extension to wrap the callout bug's img element inside the <pre> is in the null namespace, not the XHTML namespace. So it generates an error message in epubcheck3. It still works, but I don't think this problem can be ignored. Oddly enough, the <img> element is in the XHTML namespace. Is this a bug in the Java extension, or can this be fixed in the XSL?

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- From: "Bob Stayton" <bobs@sagehill.net>
To: "David Cramer" <david@thingbag.net>
Cc: "Carlos Araya" <carlos.araya@gmail.com>; <docbook-apps@lists.oasis-open.org>
Sent: Saturday, April 28, 2012 10:04 AM
Subject: Re: [docbook-apps] Issues with programlistingco


Actually, I was just about to report that I did get it working, even with epub3. It wasn't an epub3 issue, as I was getting a unhelpful Java error message even with the plain xhtml stylesheet at the point where the callout extension function was being applied. Now it is working on all fronts with the latest snapshot builds.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- From: "David Cramer" <david@thingbag.net>
To: "Bob Stayton" <bobs@sagehill.net>
Cc: "Carlos Araya" <carlos.araya@gmail.com>; <docbook-apps@lists.oasis-open.org>
Sent: Friday, April 27, 2012 9:21 PM
Subject: Re: [docbook-apps] Issues with programlistingco


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Bob,
Can you provide more information on what's not working when you use
areaspecs for callouts with epub? In some cases you have to use
areaspecs, for example if the code samples are generated or used by
some process outside the DocBook document or if you want to use syntax
highlighting. We plan to use the epub 3 xsls soon and also use
programlistingco/areaspecs for callouts regularly.

Thanks,
David

On 04/27/2012 05: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?

---------------------------------------------------------------------


To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail:
docbook-apps-help@lists.oasis-open.org


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPm3AyAAoJEMHeSXG7afUhulgH/idl4O4dALtVJa/YcYxA/hEg
9PVlHLwIQoKtS4QyJhnNL4/L7Ee7kFnf8CDIG8WAP510Jtd65ATQnXlzDryWvNrw
6GA68iS2WwfGFE115GTRuZV7eOBr5SoHA5afghKvrBXHSHtCgg3+d8kNQgoTD6it
N7IaDQJYMgWcNecspmmOqK+bf5+FKoeYFmQsVX8m13EaaoVQi+zCvI9CTMILt+LI
hdjQt68h5V16vykY1NIOTmTGs3PmTGapNwo3ds4OmnDxufaYqpB9z7dshvHTQncy
m5LTvbI9VUZ94DZSGT3laJIXEvepmG/WJfGZc0ZxixlvE0bSFnjnO0blmjJsnlo=
=pjyL
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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]