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] ePub TOC question


Thanks for the explanation of what is happening Bob. I do have
chunk.separate.lots=1 set.

I'll modify the template you suggested.

On Fri, Nov 11, 2011 at 12:32 PM, Bob Stayton <bobs@sagehill.net> wrote:
> Hi Eric,
> I don't get that output with the stock stylesheets.  You are getting this
> behavior because your customization expands 'generate.toc' to include
> figure, table, etc., and you set chunk.separate.lots=1, right?
>
> The "./" comes from the utility template named 'make-relative-filename' in
> xhtml-1_1/chunker.xsl.  I'm not sure why it is "./" instead of just blank,
> but that template is used in many contexts and I would not change that.
>
> However, you can work around it for this case by customizing the template
> named 'make.lot.chunk' in chunk-common.xsl.  When it is computing the
> variable named 'href' for a lot, it calls 'make-relative-filename' without
> the 'base.dir' param, because the generated lot is in the same directory as
> the main toc.  When 'base.dir' is not specified, you get the default "./",
> which is actually correct as a pathname and seems to work in contexts other
> than validation of epub documents, it seems.
>
> You can modify that call to add a template param:
>
> <xsl:variable name="href">
>  <xsl:call-template name="make-relative-filename">
>   <!-- Add this param with empty string value -->
>   <xsl:param name="base.dir" select="''"/>
>  etc.
>
> That eliminates the "./" from the lot references, and should not affect
> other instances of 'make-relative-filename'.
>
> Bob Stayton
> Sagehill Enterprises
> bobs@sagehill.net
>
>
> ----- Original Message ----- From: "Eric Johnson" <ericjohnson@apache.org>
> To: "Docbook Apps" <docbook-apps@lists.oasis-open.org>
> Sent: Friday, November 11, 2011 6:50 AM
> Subject: [docbook-apps] ePub TOC question
>
>
>> I'm generating Epub using the current release of the style sheets and
>> I keep getting the following error when validating my generated
>> content:
>>
>> ERROR: prod_intro.epub/OEBPS/bk01-toc.html(4):
>> 'OEBPS/./figure-toc.html': referenced resource missing in the package
>> ERROR: prod_intro.epub/OEBPS/bk01-toc.html(4):
>> 'OEBPS/./table-toc.html': referenced resource missing in the package
>> ERROR: prod_intro.epub/OEBPS/bk01-toc.html(4):
>> 'OEBPS/./example-toc.html': referenced resource missing in the package
>>
>> In addition to creating the ERROR in validation, the book opens the
>> lof, lot, and lox in a Web browser instead of in the e-book viewer.
>>
>> The xxx-toc files are all properly generated and included in the
>> package, but the generated TOC prefixes a "./" to all of them. How do
>> I get the generated hrefs to the lot, lof, and lox entries in the
>> generated TOC to not be "./xxx-toc.html"?
>>
>> Thanks,
>> Eric
>>
>> --
>> Principle Technical Writer
>> FuseSource
>> Phone: (781) 280-4174
>> E-Mail: ericjohnson@apache.org
>> Blog: http://documentingit.blogspot.com/
>> Twitter: finnmccumial
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
>> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>>
>>
>>
>
>



-- 
Principle Technical Writer
FuseSource
Phone: (781) 280-4174
E-Mail: ericjohnson@apache.org
Blog: http://documentingit.blogspot.com/
Twitter: finnmccumial


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