help with ulink in xml file

Matthew East mdke at ubuntu.com
Tue Dec 4 08:35:05 UTC 2007


Hi,

On 04/12/2007, Adam Sommer <asommer70 at gmail.com> wrote:
> You're welcome Jim,
>
> I had a question about <ulink> versus <xref>, mostly pertaining to
> https://bugs.launchpad.net/ubuntu-doc/+bug/162794 , the
> <ulinks> work fine in Yelp but when the docs are built the link points to a
> .xml file instead of a .html file.  I'm just wondering which way is better?

Use xref when linking to a section in the same document (as in this
case), but ulink when linking to a section in another document.

xref tags should be relatively straightforward (the only thing to
remember is never to use the xreflabel attribute - as you've done in
the patch - because this is untranslatable. Instead just leave them
out and the link will use the title of the section you're linking to).

ulink tags should be used with ghelp urls (in the case of documents to
be viewed in yelp) or other "language-neutral" urls (in the case of
documents to be viewed with other file viewers). After we convert the
xml to html, we have a custom script (fix-urls.sh) that goes through
all the documents and substitutes the ".xml" links with ".html" links.
In the case of your bug, we missed one...

I'll try and write this up in the style guide at some stage. If I
forget, please remind me!!!

-- 
Matthew East
http://www.mdke.org
gnupg pub 1024D/0E6B06FF




More information about the ubuntu-doc mailing list