This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] Automatic link type detection


I'd like to help you with this idea, because I think it is a good one.
Unfortunately, I'm starting a two week vacation on Wednesday and will be too
busy until then.

I think perhaps I would name the parameter 'prefer.internal.olink'.  Also, I
think the olink template in xref.xsl needs to have the code that builds the
href broken out into a separate template.  Then it could be called once with
the $current.docid as the seek.targetdoc parameter if $prefer.internal.olink
is set, and again for the olink's actual targetdoc attribute value if that
returns nothing.  After that, the 'olink.hottext' call needs to get the text
for whichever target is selected.

Now that you point this out, it seems the overall algorithm for selecting an
olink target from the database should be in a separate template, in a manner
similar to the way the 'select.mediaobject' template selects the graphics
format to use.  That way the selection algorithm could be shared in html and
fo processing, and the selection logic could be more easily customized.  I
had intended to do something like that for resolving olinks in a
documentation set that is only partially translated.  It would get the
target in the same (or requested) language if there was one, or it would
fall back to another default language.  There are a lot of possibilities if
the olink code is restructured.

If you want to pursue this before I get back, be sure to start with the
xref.xsl file in CVS, not the distributed version. I've made several changes
to olink in preparation for the next release.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Camille Bégnis" <camille@neodoc.biz>
To: "apps docbook" <docbook-apps@lists.oasis-open.org>
Sent: Monday, June 28, 2004 1:57 AM
Subject: [docbook-apps] Automatic link type detection


Hello,

I am trying to design a generic linking mechanism for use in the Borges
project (http://borges-dms.sourceforge.net/) in which master documents call
various modules (sections) to form the final document.

Let's imagine a common scenario: you are writing documentation for a
product,
which includes 3 manuals: a little installation booklet (booklet.xml), a
user
guide (user.xml), and a reference manual (reference.xml).
All 3 documents begin with the same introduction section (intro.xml) that
contains a reference to the customization section (custom.xml) which is
included in both user.xml and reference.xml documents.

How do you write the link to custom.xml in intro.xml so that it is
interpreted
correctly in all 3 documents?
- If you use xref, it will fail in user.xml
- If you use olink (pointing to reference.xml), the reference in user.xml
will point to the customization section of the reference manual, while it is
actually available in user.xml

To solve this, the olink template should be able to detect when a target is
actually available from within the same document. If so, an internal
reference should be made instead of the external one. This behavior could be
controlled through a detect.internal.olink parameter for example.

Did someone already faced that problem? How did you solve it?
I'd like to hear your input before starting to try tweaking the xref.xsl
stylesheet.

-- 
Camille Bégnis
NeoDoc Co-Founder
http://neodoc.biz


To unsubscribe from this list, send a post to
docbook-apps-unsubscribe@lists.oasis-open.org, or visit
http://www.oasis-open.org/mlmanage/.





To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]