docbook-apps

  • 1.  xrefs to titles.

    Posted 01-31-2008 16:21
      |   view attached
    Hi,

    In the attached document I have 2 <xref></xref> elements. One points to a
    sect1. The other points to the title of the sect1.

    When I convert it to PDF the <xref></xref> to the sect1 becomes a hyperlink,
    but the <xref></xref> to the title does not. In both cases, the generated
    text is correct.

    When I convert it to HTML, both <xref></xref>s become hyperlinks, but the
    one that points to the title is broken. Again, in both cases, the
    generated text is correct.

    I'm using the 1.73.2 stylesheets, processing them to HTML and FO using
    xsltproc and converting the FO to PDF with FOP. There are no errors
    when generating the HTML, but when generating the PDF, FOP prints the
    following:

    andrewmcf@andrewmcfarland$ fop aam.fo aam.pdf
    31-Jan-2008 16:11:30 org.apache.fop.area.RenderPagesModel checkPreparedPages
    WARNING: Page 1: Unresolved id reference "bar" found.

    Is this a bug in the XSLT or a bug in the end user?

    Andrew
    --
    You did not read the manual
    Our tech writer is sad
    Locked in the toilet, he is crying

    Attachment(s)

    xml
    aam.xml   524 B 1 version


  • 2.  RE: [docbook-apps] xrefs to titles.

    Posted 01-31-2008 16:55
    > In the attached document I have 2 <xref/> elements. One
    > points to a sect1. The other points to the title of the sect1.

    I've always thought of a cross-reference to a title as being
    semantically incorrect. It's always the titled object that is being
    referenced. Maybe I'm closed-minded.

    Peter Desjardins



  • 3.  Re: [docbook-apps] xrefs to titles.

    Posted 01-31-2008 17:03
    On 31/01/2008, Peter Desjardins <pdesjardins@supplyscape.com> wrote:
    > I've always thought of a cross-reference to a title as being
    > semantically incorrect. It's always the titled object that is being
    > referenced. Maybe I'm closed-minded.

    TBPH, It probably is in this case, and its not something I'd do unless
    I had no other choice.



  • 4.  Re: [docbook-apps] xrefs to titles.

    Posted 01-31-2008 17:45
    > Is this a bug in the XSLT or a bug in the end user?

    A little of both. 8^)
    Generally it is better practice to link to the container rather than the
    title element. But people do create links to title elements, and the
    stylesheets do attempt to support xrefs to titles. They should either
    support it completely, or flag an error, and not just do a half job. I would
    suggest you file a bug report on SourceForge to get it fixed for the next
    release.

    Bob Stayton
    Sagehill Enterprises
    bobs@sagehill.net


    ----- Original Message -----
    From: "Andrew McFarland" <aamcfarland@gmail.com>
    To: <docbook-apps@lists.oasis-open.org>
    Sent: Thursday, January 31, 2008 8:21 AM
    Subject: [docbook-apps] xrefs to titles.


    > Hi,
    >
    > In the attached document I have 2 <xref/> elements. One points to a
    > sect1. The other points to the title of the sect1.
    >
    > When I convert it to PDF the <xref/> to the sect1 becomes a hyperlink,
    > but the <xref/> to the title does not. In both cases, the generated
    > text is correct.
    >
    > When I convert it to HTML, both <xref/>s become hyperlinks, but the
    > one that points to the title is broken. Again, in both cases, the
    > generated text is correct.
    >
    > I'm using the 1.73.2 stylesheets, processing them to HTML and FO using
    > xsltproc and converting the FO to PDF with FOP. There are no errors
    > when generating the HTML, but when generating the PDF, FOP prints the
    > following:
    >
    > andrewmcf@andrewmcfarland$ fop aam.fo aam.pdf
    > 31-Jan-2008 16:11:30 org.apache.fop.area.RenderPagesModel
    > checkPreparedPages
    > WARNING: Page 1: Unresolved id reference "bar" found.
    >
    > Is this a bug in the XSLT or a bug in the end user?
    >
    > Andrew
    > --
    > You did not read the manual
    > Our tech writer is sad
    > Locked in the toilet, he is crying
    >


    --------------------------------------------------------------------------------


    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org




  • 5.  Re: [docbook-apps] xrefs to titles.

    Posted 02-01-2008 14:22
    On 31/01/2008, Bob Stayton <bobs@sagehill.net> wrote:
    > A little of both. 8^)

    :-)

    > Generally it is better practice to link to the container rather than the
    > title element.

    I've fixed the internal tools we were using to allow linking to
    <sect1> elements now.

    > But people do create links to title elements, and the
    > stylesheets do attempt to support xrefs to titles. They should either
    > support it completely, or flag an error, and not just do a half job. I would
    > suggest you file a bug report on SourceForge to get it fixed for the next
    > release.

    Bug submitted. http://sourceforge.net/tracker/index.php?func=detail&aid=1884431&group_id=21935&atid=373747

    Thanks,

    Andrew