Hi Thomas,
If you are using DocBook 5, you might look at using annotations for the
markup. By default, the annotation element is not processed by the
stylesheets, so you are free to define the behavior by creating your own
templates.
For example, you could put an annotation in the info of each topic to
identify its group:
<annotation role="group1" annotates="topicid"/>
where 'topicid' is the xml:id of that topic, because annotations are not
linked by family position.
The role could list multiple groups that the topic participates in, if
appropriate.
In the location where you want a See Also list to appear, you could put a
special para to identify the group:
<para role="seealso">group1</para>
The custom template for that para could use XPath to locate all annotation
elements whose role attribute matches the group name, and then process the
elements identified by the topicids as links, presented in a list form.
Bob Stayton
Sagehill Enterprises
[email protected]
--------------------------------------------------
From: "Thomas Schraitle" <[email protected]>
Sent: Friday, July 19, 2013 6:06 AM
To: <[email protected]>
Subject: [docbook] Linking to an Unknown Amount of Targets (1:n
relationships)?
Hi,
linking in DocBook has a long tradition: usually, we use <xref/>s for
internal cross references and <ulinks/> or <link/>s for remote links.
All of these elements establish a 1:1 relationship: one source links to
one target.
What do I use if I need a 1:n relationship (one source, many targets)?
For example, my cookbook[1] around DocBook and the DocBook
stylesheets contains several topics. Some topics can be grouped
thematically. I would like to show this group of links as one unit,
preferably under the "See also" section.
My idea would be to just mark up topics that belongs to one or
more groups and the stylesheet find the other ends automatically.
Anybody had this problem before? What markup did you use, what
stylesheet magic? Did extended XLinks help?
Any recommendations are very appreciated. :-)
Thanks!
[1] http://doccookbook.sf.net/html/en/index.html
--
Gruß/Regards,
Thomas Schraitle
---------------------------------------------------------------------
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]