----- Original Message -----
Sent: Monday, August 17, 2009 2:22
PM
Subject: [docbook] Custom XSL: Is there a
way to wrap the content?
Hello,
I want to create a custom XSL to wrap my
generated html content by a div. I need this for the display.
With
this...
<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema=MailScanner soupçonne le lien suivant d'être une tentative de fraude de la part de "www.oasis-open.org" "http://www.oasis-open.org/docbook/xml/5.0/rng/docbook.rng" type="xml"?>
<article xmlns=MailScanner soupçonne le lien suivant d'être une tentative de fraude de la part de "docbook.org" "http://docbook.org/ns/docbook"
xmlns:xlink=MailScanner soupçonne le lien suivant d'être une tentative de fraude de la part de "www.w3.org" "http://www.w3.org/1999/xlink" version="5.0">
<info>
<title>Article Template Title</title>
</info>
<section>
<title>Section1 Title</title>
<para>Text</para>
</section>
</article>
I want to generate this
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Article Template Title</title>
<meta name="generator" content="DocBook XSL-NS Stylesheets V1.75.1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="my_added_div"> <-----------
<div class="article" title="Article Template Title">
<div class="titlepage">
<div>
<div>
<h1 class="title"><a name="d0e2"></a>Article Template Title</h1>
</div>
</div>
<hr>
</div>
<div class="section" title="Section1 Title">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="d0e6"></a>Section1 Title</h2>
</div>
</div>
</div>
<p>Text</p>
</div>
</div>
</div> <-----------
</body>
</html>
I cannot do that with the Templates for HTML headers and
footers.
My dream is to do...
<xsl:template
name="user.body.content">
<div
class="my_added_div">
<xsl:apply-templates />
</div>
</xsl:template>
Is there a way to wrap the
content?
Thanks
Dominic