I would hate to see you lose all your internal links.  8^)
To keep them, you could customize the 'make.olink.href' template instead of emptying it. The code after this comment:

<!-- Form the href information -->

could be wrapped in:

<xsl:if test="$targetdoc = $current.docid">
...
</xsl:if>

That will turn off the href only when the target is not in the current.docid.

Bob Stayton
Sagehill Enterprises
[email protected]

--------------------------------------------------
From: "Tim Arnold" <[email protected]>
Sent: Wednesday, October 03, 2012 10:44 AM
To: "Bob Stayton" <[email protected]>
Cc: "DocBook Apps" <[email protected]>
Subject: Re: [docbook-apps] olinks for epub?

Hi Bob,
That is interesting reading. It looks like the situation will
eventually get solved.
I only have the calibre ereader on my desktop, and plain href links
work even with anchors.

One wrinkle in my own processing is that I use olinks throughout these
books with prefer.internal.olink set to 1.

So if I override the make.olink.href template I lose all links
(including the internal ones) in the epub.

Given the state of epub links maybe that is the correct thing to do,
but once ereaders standardize on the CFI structure, I'm guessing I'll
still have a problem to differentiate between local and
cross-reference links.

thanks,
--Tim

On Wed, Oct 3, 2012 at 12:25 PM, Bob Stayton <[email protected]> wrote:
Hi Tim,
In the current epub3 stylesheets, olinks will form but they won't work
because the syntax of the href is wrong for epub. I was waiting to see how
the Epub standard evolved before trying to change anything.

There is now an ePub standard for such linking called "EPUB Canonical
Fragment Identifier (epubcfi) Specification" which was finalized in October
2011:

http://idpf.org/epub/linking/cfi/epub-cfi.html

This standard has not yet been implemented in DocBook XSL, and I don't know
what the state of support is in Epub readers for it.  I have not had a
chance to try it out in readers.

For now, it would be best to turn off the hot links while retaining the
olink text. To do that, it is not necessary to modify your olink database
files.  Instead, just define this template as empty:

 <xsl:template name="make.olink.href"/>

The template named "olink.hottext" will still operate to generate the text from the olink database, but it will be rendered without a link element in the output. To avoid confusion for your readers, you probably want to turn
on the stylesheet param 'olink.doctitle' to append the other document's
title.

http://www.sagehill.net/docbookxsl/OlinkGentext.html#AddDocTitle

Bob Stayton
Sagehill Enterprises
[email protected]

--------------------------------------------------
From: "Tim Arnold" <[email protected]>
Sent: Wednesday, October 03, 2012 8:18 AM
To: "DocBook Apps" <[email protected]>
Subject: [docbook-apps] olinks for epub?

hi,
I have a set of books that I normally render as html using the 1.77
docbook stylesheets; I use an olink database to handle cross
references. That works great.

Now I need to render the individual books as epub3 and I'm not sure
how to handle these cross-book references. I would like them to
resolve to their textual representation (e.g., "Chapter 13: My Chapter
(User's Guide)") but not have it them rendered as hot links since the
links cannot work in an epub doc.

Has anyone encountered this situation? Maybe I could create a copy of
my olinkdb.xml file and remove the href attributes?

thanks for any ideas,
--Tim Arnold

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

Reply via email to