From: Bob Stayton (firstname.lastname@example.org)
Date: Thu Apr 17 2003 - 18:31:23 PDT
The DocBook XSL stylesheets have implemented two-thirds of
what you are trying to do. DocBook uses olink to link
to another DocBook document. The stylesheets have a
target collection mode that outputs the cross reference
information instead of the regular output. It outputs
XML so it can be easily parsed again on the second pass.
On the second pass, the name of the data file is passed
to the stylesheet as a parameter. The stylesheet opens the
data file and parses the data. When an olink is encountered,
it looks up the information and resolves the cross reference,
generating text if the olink is empty.
Currently it does not form active links between PDF documents,
only between HTML documents. For PDF output, if the olink
target is within the current document, it does form an
active internal link. But for external documents,
it just resolves the cross reference as plain text.
It will optionally add a title from the other document to
So I'll also interested in learning how the external linking
function in PDF can be made to work.
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
The SCO Group fax: (831) 429-1887
On Thu, Apr 17, 2003 at 05:09:24PM -0600, Jim Melton wrote:
> I am feeling unusually stupid today, so I'm turning to you for some advice,
> guidance, or outright solutions ;^) Please forgive the length of this
> note, but I want to be sure that I communicate my issue.
> I am the editor for a multi-part ISO standard (SQL). This requires that I
> periodically (roughly 3 times a year) publish working drafts of the
> complete suite of 9 parts ("part" = "separate document", each having its
> own cover page, numbering, index, etc.). Of course, once work has
> completed on a new generation of the standard, I publish the actual, final
> standards themselves. At less-frequent intervals, I must publish a single
> part (e.g., a brand new part that did not exist at the time of the previous
> publication of the existing parts, or even an Amendment to one or more
> existing parts).
> In the published documents (working drafts or standards), I have chapters
> and sections whose printed appearance is something like this:
> 4 Concepts
> 4.1 Data types
> 4.1.2 Character string types
> In my XML sources for these documents, I use an element (e.g., <chapter>,
> <section>) with an id attribute to give a symbolic name to the chapter or
> section (e.g., <chapter id="concepts"><title>Concepts</title>..., <section
> id="datatypes"><title>Data types</title>...). The number (e.g., 4, 4.1,
> 4.1.2) is automatically computed based on the position in the document as a
> Within a given document, I can symbolically reference a chapter/section by
> referencing the value of the id attribute (e.g., <docref
> ref="datatypes"/>), which my XSLT stylesheet (which, as you see, picks up
> the chapter's/section's computed number and specified title) transforms to
> a link, such as:
> <fo:block ... >
> <fo:basic-link internal-destination="datatypes">
> Section 4.1, "Data types"
> When XEP renders that to PDF, I have a nice "hot link" from the reference
> to the reference section.
> So far, so good.
> Now for my problem:
> Very frequently, from one part/document (e.g., part 5) I need to reference
> a chapter/section (and even other things that have such symbolic
> attributes) that is defined in another part/document (e.g., part
> 2). Obviously, the required information is not so easily available for
> such interdocument references.
> I would plan to use a different element (e.g., <externref part="2"
> ref="concepts"/>) for interdocument references.
> The only idea I've had so far is to write a new XSLT stylesheet that
> processes each of my documents (one at a time, manually --- since I haven't
> gotten around to worrying about scripting issues) and outputs some sort of
> file containing nothing beyond the "values" of every symbol in that
> document. Then, when I'm processing document 5 through my "real"
> stylesheet, it would somehow access all of the "symbol" files and pick up
> the chapter/section number and title.
> Question 1) Does that seem like a reasonable approach? Are there better
> approaches that I have managed to overlook or suppress?
> Question 2) Would it be better if that "symbol" file were a plain text file
> (how would I access such information in XSLT?) or an XML file (something
> like <part2References><reference number="4"
> title="Concepts/><reference.../></part2References>)? I assume that the
> information contained in an XML file would be more easily accessed in my XSLT.
> Question 3) Once I have that information, how can I turn the text (e.g.,
> Section 4.2, "Data types", in Part 2) into a "hot link" that will cause
> Acrobat to open the file containing part 2 and position it at the start of
> Section 4.2 --- or at least on the same page? (I'm aware of the
> external-destination attribute, but have not been successful at making
> referenced PDF documents open at the right place.) I'm unclear on whether
> or how the rx:outline and rx:bookmark extensions would help, particularly
> when there might be literally hundreds of referenceable destinations in a
> given document.
> Any help, advice, guidance, or outright solutions will be greatly appreciated.
> Jim Melton --- Editor of ISO/IEC 9075-* (SQL) Phone: +1.801.942.0144
> Oracle Corporation Oracle Email: mailto:email@example.com
> 1930 Viscounti Drive Standards email: mailto:firstname.lastname@example.org
> Sandy, UT 84093-1063 Personal email: mailto:email@example.com
> USA Fax : +1.801.942.3345
> = Facts are facts. However, any opinions expressed are the opinions =
> = only of myself and may or may not reflect the opinions of anybody =
> = else with whom I may or may not have discussed the issues at hand. =
> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
> in the body of the message to firstname.lastname@example.org from the address
> you are subscribed from.
> (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
-- Bob Stayton 400 Encinal Street Publications Architect Santa Cruz, CA 95060 Technical Publications voice: (831) 427-7796 The SCO Group fax: (831) 429-1887 email: email@example.com ------------------- (*) To unsubscribe, send a message with words 'unsubscribe xep-support' in the body of the message to firstname.lastname@example.org from the address you are subscribed from. (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
This archive was generated by hypermail 2.1.5 : Thu Apr 17 2003 - 22:32:40 PDT