[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Request for design tips: transforming XML topics +
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 http://docbook.sourceforge.net/ Jirka -- ----------------------------------------------------------------- Jirka Kosek e-mail: jirka@xxxxxxxx http://www.kosek.cz Attachment:
smime.p7s
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|