[xep-support] Inter-document references

From: Jim Melton (jim.melton@acm.org)
Date: Thu Apr 17 2003 - 16:09:24 PDT

  • Next message: Bob Stayton: "Re: [xep-support] Inter-document references"

    Gentlepeople,

    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
    whole.

    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"
       </fo:basic_link>
       </fo:block>

    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.

    Thanks!
        Jim
    ========================================================================
    Jim Melton --- Editor of ISO/IEC 9075-* (SQL) Phone: +1.801.942.0144
    Oracle Corporation Oracle Email: mailto:jim.melton@oracle.com
    1930 Viscounti Drive Standards email: mailto:jim.melton@acm.org
    Sandy, UT 84093-1063 Personal email: mailto:jim@melton.name
    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 majordomo@renderx.com 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 - 16:19:50 PDT