An attribute such as xlink:href=”” refers to an arbitrary URL. This is similar to the DocBook 4 ulink element, which was removed in DocBook 5. ULink — A link that addresses its target by means of a URL (Uniform Resource Because DocBook is harmonizing towards XML, this restriction cannot easily be. Keywords: external links, simple XLinks, xlink:href, ulink . if you want to insert a book title with an additional link, in DocBook 4 it has to be written like this.
|Published (Last):||18 December 2014|
|PDF File Size:||14.96 Mb|
|ePub File Size:||20.53 Mb|
|Price:||Free* [*Free Regsitration Required]|
The way it works is you set the stylesheet parameter ulink. DocBook 5 has a new system for associating annotations with elements.
The universal linking mechanism enables you to create logical links between any two DocBook elements. For example, if you put an xlink: In DocBook 5, most elements that generate some output can be made uulink a link. The link element contains some text or even other elements: Usually, external links are used in two ways:.
If you also set the parameter ulink. It is quite easy to customize in order to extend or subset the DocBook schema.
An attribute such as xlink: An element’s annotations attribute accepts multiple space-separated values, so any element can be associated with more than one annotation. Note, validation is only performed when using linkendnot with xlink: Setting up the tools. An annotates attribute on an annotation element matches the value of the xml: The annotation element for an arbitrarily complex description.
Simplified DocBook DTD: Element ulink
For example, to open a new window when clicking a link, use the xlink: The DocBook stylesheets currently only handle xlink: It is relatively easy to read in its compact form. It is allowed to use text content or leave a link completely empty.
You can assign a role attribute to an annotation to identify it as a certain kind of annotation. Using separate element names permitted each of them to have a different content model in the DTD, if it was needed. For FO output, you can docblok whether the url attribute value for the ulink is printed. In DocBook 5, elements from DocBook klink such as bookinfochapterinfosectioninfoetc. An alt element is placed as a child of the element it is describing. However, if you put an xlink: The first ulink example is not empty, so its text content becomes the hot text in HTML output.
The link can go to an internal or external destination. In this case, the URI is http: When a namespace attribute has no prefix, the namespace becomes the default namespace.
The following is an example of an annotation element associated with a chapter element:.
It has these features:. URL link with generated text.
Creating a link from your DocBook document to a website is easy. They are each described in more detail in the following sections.
Olink with generated text. These other versions contain the same element and attribute names. The former will generate a hyphen if the URL breaks, and the latter will not. Another major difference between DocBook 4 and DocBook 5 is the schema language.
Universal linking in DocBook 5.
Chapter 4. DocBook 5 tools
It is a general purpose element that can be used for a wide variety of annotation semantics. However, not all docook support both characters, so you should test. To make them more flexible for modular documents, the annotates and annotations attributes are declared as attribute type CDATA. Links With Content Using xlink: So it can contain any number of paragraphs, lists, admonitions, etc. DocBook 5 is the next generation of DocBook. The olink element itself is retained in DocBook 5.
If not, then the stylesheet will report that the module’s root element has no matching template. Internal and External Links Examples With linkend vs.
Of course, just adding a namespace declaration may not make a DocBook 4 uilnk a valid DocBook 5 document. These are the major changes included in DocBook 5. Regardless if it is an empty link with xlink: Note that the root element is now d: Otherwise, the element cannot be resolved during processing and and the link will be broken.