kde-DocBook profiling

Lauri Watts lauri at kde.org
Tue May 4 13:52:08 CEST 2004


On Tuesday 04 May 2004 11.33, frank_schoolmeesters at fastmail.fm wrote:
> Hi,
>
> I write the documentation for Krusader and i try to use profiling,
> but untill now without success.
> The purpose is to put some extra screenshots in the HTML version of
> the documentation, which is been parsed from the KDE/Docbook source.
> These extra screenshots will not be available in the HTML documentation
> but not in the KDE help center.
> The reason is that i don't want to "blow up" the sourcecode tarball
> with screenshots.
> So the docbook (source) version needs profiling for displaying the extra
> screenshot in HTML, or not in the other versions.
> Untill now i dit not find out how i can do this.

You can do it with xsltproc, but this is sort of from memory, and I'm not sure 
you can profile on role (I *know* you can profile on vendor and arch, I've 
never tried on role, but it ought to work)  I'm also not sure that you can do 
this while using the KDE DTD, I've never tried.  Hopefully this is enough to 
point you in the right direction though.  I expect you can find more 
information on either the docbook wiki or in Bob Stayton's excellent XSLT 
book (also available online.)

Something like this in your sources:
<imageobject>
<imagedata ... role="manual" />
<imagedata ... role="website" />
<imageobject>

And to process (one commandline, sorry for the wrapping):
xsltproc --output doc/index.docbook --catalogs --stringparam profile.role 
manual /usr/local/share/xsl/docbook/xhtml/profile-docbook.xsl source.docbook

Where source.docbook is your original XML file, and doc/index.docbook is where 
you want the resulting docbook file to go.  That would give you a docbook 
file for further tranforming as usual (normally with meinproc)

This kind of stuff is nightmarish to distribute, which is why we don't.  The 
profile stylesheet is provided with the standard stylesheets, you'll need to 
fix the path above of course.  

Regards,
-- 
Lauri Watts
KDE Documentation: http://i18n.kde.org/doc/
KDE on FreeBSD: http://freebsd.kde.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: signature
Url : http://mail.kde.org/pipermail/kde-docbook/attachments/20040504/1a69feb8/attachment.pgp 


More information about the kde-docbook mailing list