Re: [xsl] Request for design tips: transforming XML topics + map to various XHTML + meta data formats

Subject: Re: [xsl] Request for design tips: transforming XML topics + map to various XHTML + meta data formats
From: Jirka Kosek <jirka@xxxxxxxx>
Date: Sun, 22 Feb 2004 12:10:36 +0100
Graham Hannington wrote:

And finally... I know, this is probably asking too much... since the
transformations to Eclipse Help, HTML Help 1.x, or MS Help 2 all involve
pretty much the same sort of processing (such as merging map hierarchy with
topic titles), I'm wondering how hard it would be to have a generalized XSLT
stylesheet for creating "HTML plus format-specific meta data" from "topics
(containing contents amd some imbedded meta data) plus topic map (topic
hierarchy and some other meta data)". Where the output format is specified
as an XSLT parameter that acts as a switch to select format-specific
template processing... or even... the topic map itself specifies the desired
output formats, and the XSLT style sheet produces them all in a single
pass... (not iteratively: call XSLT stylesheet with output parameter set to
"Eclipse", then call it again with output parameter set to "HTML Help",
then...) Am I dreaming?

I think that differences between various help format project files are so big that using your proposed "meta approach" will be either overcomplex or will allow you to use only intersection of features provided by respective formats.

I created or maintain stylesheets which generate HTML Help, Java Help and Eclipse from DocBook XML. Especially getting HTML Help was real pain as MS help compiler doesn't allways accepts "well-formed" HTML in project files, so I must use text output method to emit HTML markup >:-(

Current approach used in the DocBook stylesheets is compromise which shares a lot of code but format specific code is separated. We have stylesheets which produce plain HTML. These stylesheets are imported by quite small stylesheets which generate project files for particular help format. In these stylesheets we are reusing common templates which are able to return things like topic name, topic URL, topic ID and so on. Walking through document hieararchy is simple recursion in the DocBook so this is automatically done by XSLT processor and thus there is no need to create meta-document walker which might be case for DITA (I don't know details of this system very well).

If you are interested, you can get DocBook XSL stylesheets from


  Jirka Kosek  	
  e-mail: jirka@xxxxxxxx

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Current Thread