The following is an example of a mediaobject set up for both HTML and FO outputs. The DocBook stylesheets can automatically select the right graphic if the. In DocBook V, three types of external objects are defined: VideoObjects, AudioObjects, and ImageObjects. Additional textual descriptions may be provided. version, , xsd:anySimpleType, Specifies the DocBook version of the element and its descendants, from group utes · xml:lang, .
|Published (Last):||4 August 2012|
|PDF File Size:||6.16 Mb|
|ePub File Size:||20.80 Mb|
|Price:||Free* [*Free Regsitration Required]|
The DocBook stylesheets can automatically select the right graphic if the imageobject elements have a role attribute of either html or fo. This selection method is often sufficient, but is somewhat less precise than selecting by role.
If the fileref does not have an extension, it checks the graphic. You might be wondering why the imagedata element needs an imageobject container? If so, then it accepts that object and does not consider any others. If you are using XEP, then set the parameter preferred.
Although informalfigure does not take a title, docboook both provide additional attributes for handling your graphics:. For cross referencing purposes, put the id attribute on the mediaobject container, unless you are putting that inside another container such as figure.
The start-indent property is controlled by the attribute-set named dobcook. The same is true for informal. A mediaobject element is a container for one or more imageobject elements, each of which has an imagedata element. Each of these main graphic elements is supplemented with a version to be used inline, named inlinegraphic and inlinemediaobjectrespectively.
If all of these tests fail on the first imageobjectit repeats them mediaobect subsequent objects until it finds an acceptable one. If you do not use the role attribute to select from among several imageobject elements, then the stylesheets will try to make a choice based on file format. You could use profiling to select from among several graphic elements, but mediaobject is designed to mediaonject it without the need for the profiling step.
Remember that the role attribute goes on the imageobject element, not the imagedata. If you need to use more than one graphics file format, then you must use the mediaobject element instead of the graphic element.
The stylesheet can then choose the appropriate object for a given output. When you mediaobkect this example with the html stylesheet, you get the PNG graphic, and when you process it with the FO stylesheet, you mediwobject the PDF graphic. The original graphic element is simple, but not flexible enough to handle multiple output formats.
If that value is on the list of extensions for that output, then it accepts that object and does not consider any others. If you use example or informalexamplethen you can use the example.
The preferred element for graphics is mediaobject. If its imagedata element does not contain an SVG graphic, but has a format attribute, it checks to see docbbook its value is on the format list for that output.
You can turn that behavior off if you set the parameter to zero. You might set the role values for two different vector graphics to fo-fop and fo-xep.
The automatic selection behavior is controlled by the use. It looks at the first imageobject inside the mediaobject. The following attribute sets provide the spacing in the stylesheet, which you can adjust in your customization layer:. Each imagedata element indicates its file name and format.
For example, if you have a choice of XSL-FO processors, then you could designate a graphic format optimized for each one. Because imageobject can also contain an objectinfo element. If two objects are acceptable, only the first can ever be selected with this method. You can also wrap your mediaobject element inside a figure or informalfigure element.
If its imagedata element contains a complete SVG graphic and the parameter use. With figureyou can supply a title, and your figures will be numbered and listed in the optional front-of-the-book List of Figures.
Then you pass the selected role value in a command line parameter named preferred. If that is not desirable, then add the changes to docblok figure. If it is nonzero, then the role attribute is considered during the selection process.
If you want finer control, then you have the option to use any role values you want. But the first thing you must do is decide which elements will hold your graphics.