This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] website - incorporating html inside a page ?
- From: Marc Baaden <marc at smplinux dot de>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Thu, 30 Oct 2003 02:36:21 +0100
- Subject: Re: [docbook-apps] website - incorporating html inside a page ?
Hi Bob,
thanks a lot for your tips, they were very helpful indeed.
I managed to do what I wanted to by following your advice and
devising a strategy to transform the original html file via
xhtml/xsl into something that can be inserted in docbook website.
Here is a small summary/guide to insert html into docbook. But
this could certainly also be modified for eg including external
fo into db-fo.
Three things are required for this to work properly:
1) modify the xml source
In order for that to work properly, I insert the processing
statement into a website webpage after the head tag, included
within a section, like follows:
[website-xml-file]:
[..]
</head>
<webtoc/>
<section>
<?htmlcode test.html ?>
</section>
[..]
2) modify the xsl customization
In the xsl-customization I use your code snippet:
<!-- this is for inserting verbatim html code -->
<xsl:template match="processing-instruction('htmlcode')">
<xsl:variable name="code" select="document(normalize-space(.),/)"/>
<xsl:copy-of select="$code/foo/*"/>
</xsl:template>
3) create the html snippet (or document) to be inserted
To obtain the code to be inserted (wrapped into <foo> .. </foo> etc),
I use a little script devised for that purpose. If anybody is interested,
the two corresponding files can be found at
http://baaden.nerim.net/pub/html2insert.sh
http://baaden.nerim.net/pub/xhtml2body.xsl
usage is briefly explained in the html2insert.sh comments.
Thanks again for your support and valuable input,
Best wishes,
Marc
bobs@sco.com said:
>> I was able to accomplish it using a processing instruction and a small
>> customization to open the html file and copy it through to the output.
--
Dr. Marc Baaden - Laboratory of Molecular Biophysics, Oxford University
mailto:baaden@smplinux.de - ICQ# 11466242 - http://www.marc-baaden.de
FAX/Voice +49 40333 968508 - Tel: +44 1865 275380 or +33 609 843217
To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.