This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[docbook] Re: XLink and OLink in Docbook 5


Sam Steingold wrote:

Now, IIUC, <olink> is gone from Docbook 5.
XLink, as I can glean from a cursory look at <http://www.w3.org/TR/xlink/>,
uses URIs, and is therefore equivalent to the old <ulink>.

No, it isn't. Ulink is used to point to some resource on the web. In context of DocBook it is usually chunked or non-chunked HTML or PDF version of document. But if you will use XLink as replacement for olink you will use URIs of *source DocBook document* not URIs of transformed and processed documents. This is a big difference.


And if you for some reason don't like URLs and you want something completely location independent and indirect, you can use URNs. So instead:

<olink targetdoc="UserGuide" targetptr="ch.Configuration">blabla</olink>

you can use

<link xlink:href="urn:x-sam:UserGuide#ch.Configuration">blabla</link>

and even

<link xlink:href="UserGuide#ch.Configuration">blabla</link>

will be valid from URI point of view, but not 100% technically correct. In fact there is no big difference in olink and XLink based linking in DocBook 5.

So what is the recommended way to create inter-document link in Docbook 5?
E.g., I have a <book> and a <refentry> which link to each other.
I produce 2 versions of html from <book>: chunked and single file.
I produce 1 html version of <refentry> (but it is heavily
post-processed).

It depends on processing tools you are using. But in general you should use something like:


<link xlink:href="book.xml#foo">blabla</link>

and

<link xlink:href="refentry.xml#bar">blabla</link>

or URNs as described above.

I hope that it is clear now and that I chased your concerns away.

Jirka

--
------------------------------------------------------------------
  Jirka Kosek     e-mail: jirka@kosek.cz     http://www.kosek.cz
------------------------------------------------------------------
  Profesionální školení a poradenství v oblasti technologií XML.
     Podívejte se na náš nově spuštěný web http://DocBook.cz
       Podrobný přehled školení http://xmlguru.cz/skoleni/
------------------------------------------------------------------

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]