logo       

referencing image files in docbook: msg#00000

Subject: referencing image files in docbook
Hello,

while putting RefDB into some debian packages (more info about this
should be forthcoming, after I get the packaging worked-out), I was
building the sgml  manual from source, and I noticed a problem with
how the sgml 'figure' elements were being translated into html.

I'm not sure what was used to build the html manual that you have
online , but with the docbook-utils and docbook-dsssl-stylesheets on
my debian/sid  box, this wasn't handled as I think it was expected to
be, in the html DSSSL stylesheets:

        <figure float="0" id="figure-threetier">
          <title>&appname; three-tier architecture</title>
          <graphic fileref="refdbmanualfig1"></graphic>
        </figure>


Given a file name with no extension, in the graphic/@fileref, it uses
exactly that in the final HTML:  <img src="refdbmanualfig1"> 

It worked-out alright with the postcript output, though, even so.


Now, when it's done like this, it works out alright in the html, and
the postscript, both:

        <figure float="0" id="figure-threetier">
          <title>&appname; three-tier architecture</title>
          <mediaobject>
            <imageobject>
              <imagedata fileref="refdbmanualfig1.png">
            </imageobject>
            <imageobject>
              <imagedata fileref="refdbmanualfig1.eps" format="EPS">
            </imageobject>
          </mediaobject>
        </figure>

the format="" attribute may be optional, but it's bettter to include
it and not leave the processor guessing. It can't very well be
included for the png file, though, when using the docbook 3.1 dtd --
docbook 3.1, apparently,  has no  'token' (?) definition for PNG
(docbook 4.2 does, though).

Still, it looks right in the output, when giving the exact *.png and
*.eps filenames -- for the html, the foo.png file is used instead of
the foo.eps, and the foo.eps one is still used when generating the
postscript (and, if i understand the docbook-utils correctly, the eps
would be used for the pdf too, effectively. AFAIK, docbook2pdf just
makes the postscript into pdf) [too, the order of file-type preference
can be set in /usr/share/sgml/docbook/utils-0.6.13/docbook-utils.dsl
... that's where it is on my box ... by modifying the varaibles
`preferred-mediaobject-extensions' and `acceptable-mediaobject-extensions',  
for the respective PRINT and HTML sections. It looks like it 
comes with some reasonable defaults, though.]


So, if this makes sense, I could go through and edit the *.sgml files
that have 'figure' elements, and maybe even change the doctype
declarations for all the files,  for using docbook 4.2, and submit a 
diff. (Otherwise, I'll end up keeping a diff anyway, heh, for the
debian packages)


sounds reasonable?


thanks,

--
sean champ


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe