OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: DOCBOOK-APPS: Removing <html>,<head> & <body>


I am currently working on a small project, where I would like to
present content from a partial or full docbook document in an webpage.
(I am playing around with http://www.binarycloud.com/)

I intend to have docbook xml as source and then run this source through
a widget into a part of a webpage. This a little like the idea with the
website.dtd and stylesheets, but here with a full enterprise class web
application platform behind.

The idea behind is to be able to use docbook markup when creating for
example a Wiki system. This is just on the idea stage so far.
It is probably not the fastest way to present content *cough*,
but there is the big advantage that the information source is clearly
This could also be used in many different areas, publishing books etc.
(given that the book will take a whole page since I guess chunking won't
work without having the presentation system chunk the book)

When adding content into a page the <html>, <head> and <body> is not
The docbook.xsl (1.53.0) adds these elements (line 301-326).
I have currently solved this by commenting out the unwanted portions
(see example at the end).

I have tested this with saxon 6.5.2 and a small xml file containing the
<para> example from TDG. With the below changes this comes out right,
without any problems. (<p>text<ul>more text</ul></p>)
I have also tested the <chapter> example and that also works nicely.

My questions are:

How do I go about changing this in the best way ?
The <!-- --> will work for now, but is there a better way ?

This "feature" will only be called by the webappliction while docbook.xsl
should remain normal. I guess it is possible to write some simple
stylesheet that calls docbook.xsl

Sorry if my questions are trivial, my xsl knowledge is limited.


Fredrik Svensson

== line 301-326 docbook.xsl (1.53.0) ==
<xsl:template match="*" mode="process.root">
  <xsl:variable name="doc" select="self::*"/>

  <xsl:call-template name="root.messages"/>

<!--  <html>
    <xsl:call-template name="head.content">
      <xsl:with-param name="node" select="$doc"/>
    <xsl:call-template name="user.head.content">
      <xsl:with-param name="node" select="$doc"/>
    <xsl:call-template name="body.attributes"/> -->
    <xsl:call-template name="user.header.content">
      <xsl:with-param name="node" select="$doc"/>
    <xsl:apply-templates select="."/>
    <xsl:call-template name="user.footer.content">
      <xsl:with-param name="node" select="$doc"/>
<!--  </body>

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC