OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Don't know what gentext to create for xref to "informalfigure" or "mediaobject"


Hi,
The stylesheets currently don't have a method of generating text for an xref 
to a mediaobject.  While it might seem obvious to use the caption text, that 
is not always appropriate.  I've seen captions with multiple paras and an 
equation or two, and all that text is not appropriate for an xref link.  The 
same problem applies to an xref to any element that can contain a mix of 
block elements.  Even a para can contain other block elements.

One solution is to put the mediaobject inside a figure element, move the 
caption text to the figure title, and xref to the figure.  But figure titles 
are numbered, and you may not want that.

Another solution is to put an id attribute on the para inside the caption, 
and add an endterm attribute to the xref  that points to that id:

<caption><para id="ghist">Graphical history of the <filename
    class="directory">hello</filename> repository</para></caption>

<xref endterm="ghist" linkend="fig.tour-basic.history"/>

See this reference for more information on the use of endterm:

http://www.sagehill.net/docbookxsl/CrossRefs.html#OptsGenXref

You could also develop a customization that uses the caption for the 
generated text for an xref to a mediaobject.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- 
From: "Dongsheng Song" <dongsheng.song@gmail.com>
To: "Docbook-Apps" <docbook-apps@lists.oasis-open.org>
Sent: Monday, March 16, 2009 12:53 AM
Subject: [docbook-apps] Don't know what gentext to create for xref to 
"informalfigure" or "mediaobject"


> What's wrong with the following docbook xml snippet:
>
>    <para>Figure <xref linkend="fig.tour-basic.history"/> provides a
>      graphical representation of the history of the <filename
> class="directory">hello</filename> repository, to make it a
>      little easier to see which direction history is
>      <quote>flowing</quote> in.  We'll be returning to this figure
>      several times in this chapter and the chapter that
>      follows.</para>
>
>    <informalfigure>
>      <mediaobject id="fig.tour-basic.history">
> <imageobject><imagedata fileref="images/tour-history.png"/></imageobject>
> <textobject><phrase>XXX add text</phrase></textobject>
> <caption><para>Graphical history of the <filename
>     class="directory">hello</filename> repository</para></caption>
>      </mediaobject>
>    </informalfigure>
>
> How to xref 'imageobject' with 'caption' correctly?
>
> Thanks,
>
> ---
> Dongsheng Song
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>
> 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]