This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Removing <html>,<head> & <body>


Hi,

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
defined.
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
needed.
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.

Sincerely,

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]