XSL Transformation: append header and footer

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Zby
Posts: 36
Joined: Tue Apr 05, 2005 10:52 am

XSL Transformation: append header and footer

Post by Zby »

Hi,

I don't know how this feature is supposed to work. Maybe anyone has experience with it?

I want my HTML pages to have the same header. So when I defined a scenario to convert DocBook files into HTML, I also specified a header. It is a short piece of HTML.
I expected that Oxygen will append the header just after BODY, not before HTML. However, it works quite opposite, that is the header files is included at the very top of the result file.

How can I work around this bug/feature? I'd like to have header included in the body of each file. I don't want the present behavior since this can easily be done from the OS level, as the file concatenation operation.


Can anyone help, please?

Rgds,
Zby
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi Zby,

The header and footer in the transformation were designed to allow the user to visualize the result of the pransformation in cases when that alone cannot be rendered by the html viewer. Imagine a case when the stylesheet generates only a part of the document. In this case the missing parts can be added in header and footer and get a complete document that can be rendered. Maybe the names for these, header and footer are not the best choice...

Best Regards,
George
Zby
Posts: 36
Joined: Tue Apr 05, 2005 10:52 am

Post by Zby »

George,

I can imagine such a situation. And I admit that naming could be less misleading :) However, you didn't answer my question. How do I work around the intentional behavior of header/footer. Is there any way, other than the XSL postprocessing, to include headers as I intended?

Thanks,
Zby
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi Zby,

That depends on your transformation and there is not a generic support that can handle all the transformations. You can do that either as you say, postprocessing the result or you can customize the stylesheet to include that information. I do not know however how to do that for DocBook but try looking at Bob's complete guide (http://www.sagehill.net/docbookxsl/index.html) or you can ask on the docbook-apps list.

Best Regards,
George
Post Reply