Hi Dean,
Out of the box, the role values that work are established by the
global param named 'stylesheet.result.type', which is set in each
stylesheet. It is not set in the param.xsl file because it is an
internal param that is not to be set by the user.
- In fo/docbook.xsl, $stylehsheet.result.type is set to 'fo', so an
imageobject with role="fo" is matched there.
- In html/docbook.xsl, the param is set to 'html'. Since chunk.xsl
imports that file, it gets that value too.
- In xhtml/docbook.xsl and xhtml_1-1/docbook.xsl, it is set to 'xhtml',
but the selection process will fall back to an imageobject with role="html" if
there isn't an imageobject with role='xhtml'.
- All the other stylesheets inherit the param value that they
import. Since htmlhelp imports html/docbook.xsl, it selects for 'html'
too. Same with eclipse and javahelp. The epub stylesheet imports
xhtml_1.1, it selects for 'xhtml' (with fallback to 'html').
You mentioned role values of 'HTML', 'XHTML', 'fo-xep', and
'fo-fop'. None of those would be recognized (it is case sensitive), and
the selection process falls back to looking at image filename extensions to
find one that is acceptable for the given output.
But you can override any of these by setting the param
'preferred.mediaobject.role' in your customization layer to some value other
than blank. That param is checked first. My example with 'fo-xep'
set that param as an example of customizing the selection process.
----- Original Message -----
Sent: Monday, March 23, 2009 2:14
PM
Subject: [docbook-apps] Imageobject
choices for ROLE.
Hello Docbookers,
I have been moving some of my <graphic>'s over to
<mediaobject>'s. This is mainly to support SVG for FOP and PNG
for HTML & XHTML. However, I was a bit baffled on the choice to use for
MSHELP outputs. Are the choices for "role" for imageobject only "fop,
HTML,XHTML, fo-xep, fo-fop"?
Obviously "role" can be anything, but I am specifically asking about
the stock DocBook XSL processing when using these attributes. What is the
stylesheets capable of?
Thanks
Dean Nelson
PS: Most of the above info comes from Bob's book only, as I couldn't
find any info on this in the XSL reference doc or in the
TDG.
A Good Credit Score is 700 or Above. See
yours in just 2 easy steps!