Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I put figure title at bottum of the figure?

Status
Not open for further replies.

rajpatel5901

Technical User
Jan 31, 2006
9
US
I have the following XML code in which I have added a figure and the title of the figure. I have done that by adding "figure(screenshot" attribute. When I run the XML file thru docbook.xsl stylesheet, the title of the figure comes at the top of the figure. I need to get the title at the bottum of the figure.

Any help is appreciated. If there are alternative ways of doing thing that would also help. The nice thing about"figure(screenshot)" is that it gives all list of figures in the beggining of the document.

Here is the code:

<figure float="0">
<title>
<emphasis role="bold">Wireless Reality in the top menu</emphasis>
</title>
<screenshot>
<screeninfo />
<mediaobject>
<imageobject>
<imagedata fileref="WirelessRealityInMenu.gif" />
</imageobject>
</mediaobject>
</screenshot>
</figure>

Thanks a lot in advance.

Raj
 
What are you trying to achieve?

Post your full XML, XSL and desired result.

Jon

"I don't regret this, but I both rue and lament it.
 
JontyMC,

Here is the XML code:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE book (View Source for full doctype...)>
- <book>
<title>Assets and Records Verification Services - Wireless and Switch Reality</title>
- <chapter>
<title>Assets and Records Verification Services - Wireless and Switch Reality</title>
- <section>
<title>1.1 Assets and Records in the top menu</title>
<para>Select Wireless Reality and then Assets and Records to obtain access to your Wireless Reality reports.</para>
- <figure float="0">
- <title>
<emphasis role="bold">Wireless Reality in the top menu</emphasis>
</title>
- <screenshot>
<screeninfo />
- <mediaobject>
- <imageobject>
<imagedata fileref="WirelessRealityInMenu.gif" />
</imageobject>
</mediaobject>
</screenshot>
</figure>
<para>You can also select Switch Reality and then Assets and Records to obtain access to your Switch Reality reports.</para>
- <figure float="0">
<title>Switch Reality in the top menu</title>
- <screenshot>
<screeninfo />
- <mediaobject>
- <imageobject>
<imagedata fileref="SwichRealityInTopMenu.gif" />
</imageobject>
</mediaobject>
</screenshot>
</figure>
</section>
- <section>
<title>1.2 Select an Office</title>
<para>After you select Assets and Records as shown in Section 1.1, “Assets and Records in the top menu” use the drop down menu to select your site.</para>
- <figure float="0">
<title>Select an Office</title>
- <screenshot>
<screeninfo />
- <mediaobject>
- <imageobject>
<imagedata fileref="SelectAnOffice.gif" />
</imageobject>
</mediaobject>
</screenshot>
</figure>
<para>Use the Go button once you have selected your network element</para>
</section>
- <section>
<title>1.3. Select a report and an output format</title>
<para>Once you have selected your office (see Section 1.2, “ Select an Office ”) you'll be able to select Network Element, Unit/Category and Report.</para>
- <figure float="0">
<title>Select a report</title>
- <screenshot>
<screeninfo />
- <mediaobject>
- <imageobject>
<imagedata fileref="SelectAReport.gif" />
</imageobject>
</mediaobject>
</screenshot>
</figure>
<para>MS Excel is limited to 65,000 lines of Data. Comma Deleted Text is very fast and it can be exported to many different database and spreadsheet programs. The default is HTML.</para>
<para />
<para>As optional step you can select Advanced Filters (see Section 1.4, “Advanced Filters”) or you can generate report pressing submit button.</para>
</section>
- <section>
<title>1.4. Advanced Filters</title>
<para>The Optional Step button can be used to refine your report by SM, Unit, Shelf, or other filters depending on the report.</para>
- <figure float="0">
<title>Optional Step link</title>
- <screenshot>
<screeninfo />
- <mediaobject>
- <imageobject>
<imagedata fileref="Pictures/OptionalStep.gif" />
</imageobject>
</mediaobject>
</screenshot>
</figure>
- <figure float="0">
<title>Advanced Filter page</title>
- <screenshot>
<screeninfo />
- <mediaobject>
- <imageobject>
<imagedata fileref="Pictures/AdvancedFilter.gif" />
</imageobject>
</mediaobject>
</screenshot>
</figure>
</section>
- <section>
<title>1.5. Reports Generation</title>
<para>For some reports presenting large amount of data it is recommended to limit the scope of displayed data or use CDT format. The reports are:</para>
- <itemizedlist>
- <listitem>
<para>DNUS Port Configuration</para>
</listitem>
</itemizedlist>
- <itemizedlist>
- <listitem>
<para>DLTU Port Configuration</para>
</listitem>
</itemizedlist>
- <itemizedlist>
- <listitem>
<para>OUI Port Configuration</para>
</listitem>
</itemizedlist>
- <itemizedlist>
- <listitem>
<para>LU Port Configuration</para>
</listitem>
</itemizedlist>
- <itemizedlist>
- <listitem>
<para>AIU Port Configuration</para>
</listitem>
</itemizedlist>
- <itemizedlist>
- <listitem>
<para>DCLU Port Configuration</para>
</listitem>
</itemizedlist>
- <itemizedlist>
- <listitem>
<para>IDCU Port Configuration</para>
</listitem>
</itemizedlist>
- <itemizedlist>
- <listitem>
<para>ISLU Port Configuration</para>
</listitem>
</itemizedlist>
- <itemizedlist>
- <listitem>
<para>Port Configuration</para>
<para>If you select one of the above reports and choose HTML or Excel format and not use filtering page or choose ALL SMs on filtering page, then warning message appear. Using CDT format is selected by default.</para>
- <figure float="0">
<title>Warning screen</title>
- <screenshot>
<screeninfo />
- <mediaobject>
- <imageobject>
<imagedata fileref="Pictures/RGA_Warning_Screen.jpg" />
</imageobject>
</mediaobject>
</screenshot>
</figure>
<para>You can select not to see the warnig message in the future.</para>
</listitem>
</itemizedlist>
</section>
</chapter>
</book>



Here is the Stylesheet: it is docbook.xsl
<?xml version="1.0" ?>
- <xsl:stylesheet xmlns:xsl=" xmlns:ng=" xmlns:db=" xmlns:exsl=" exclude-result-prefixes="db ng exsl" version="1.0">
<xsl:eek:utput method="html" encoding="ISO-8859-1" indent="no" />
- <!--
********************************************************************
$Id: docbook.xsl,v 1.38 2005/07/14 17:04:24 nwalsh Exp $
********************************************************************

This file is part of the XSL DocBook Stylesheet distribution.
See ../README or for copyright
and other information.

********************************************************************

-->
- <!-- ====================================================================
-->
<xsl:include href="../VERSION" />
<xsl:include href="param.xsl" />
<xsl:include href="../lib/lib.xsl" />
<xsl:include href="../common/l10n.xsl" />
<xsl:include href="../common/common.xsl" />
<xsl:include href="../common/labels.xsl" />
<xsl:include href="../common/titles.xsl" />
<xsl:include href="../common/subtitles.xsl" />
<xsl:include href="../common/gentext.xsl" />
<xsl:include href="../common/targets.xsl" />
<xsl:include href="../common/olink.xsl" />
<xsl:include href="../common/pi.xsl" />
<xsl:include href="autotoc.xsl" />
<xsl:include href="autoidx.xsl" />
<xsl:include href="lists.xsl" />
<xsl:include href="callout.xsl" />
<xsl:include href="verbatim.xsl" />
<xsl:include href="graphics.xsl" />
<xsl:include href="xref.xsl" />
<xsl:include href="formal.xsl" />
<xsl:include href="table.xsl" />
<xsl:include href="htmltbl.xsl" />
<xsl:include href="sections.xsl" />
<xsl:include href="inline.xsl" />
<xsl:include href="footnote.xsl" />
<xsl:include href="html.xsl" />
<xsl:include href="info.xsl" />
<xsl:include href="keywords.xsl" />
<xsl:include href="division.xsl" />
<xsl:include href="toc.xsl" />
<xsl:include href="index.xsl" />
<xsl:include href="refentry.xsl" />
<xsl:include href="math.xsl" />
<xsl:include href="admon.xsl" />
<xsl:include href="component.xsl" />
<xsl:include href="biblio.xsl" />
<xsl:include href="glossary.xsl" />
<xsl:include href="block.xsl" />
<xsl:include href="task.xsl" />
<xsl:include href="qandaset.xsl" />
<xsl:include href="synop.xsl" />
<xsl:include href="titlepage.xsl" />
<xsl:include href="titlepage.templates.xsl" />
<xsl:include href="pi.xsl" />
<xsl:include href="ebnf.xsl" />
<xsl:include href="chunker.xsl" />
<xsl:include href="html-rtf.xsl" />
<xsl:include href="docbookng.xsl" />
<xsl:include href="annotations.xsl" />
<xsl:param name="stylesheet.result.type" select="'html'" />
<xsl:param name="htmlhelp.output" select="0" />
- <!-- ====================================================================
-->
<xsl:key name="id" match="*" use="@id|@xml:id" />
<xsl:key name="gid" match="*" use="generate-id()" />
- <!-- ====================================================================
-->
- <xsl:template match="*">
- <xsl:message>
<xsl:text>No template matches</xsl:text>
<xsl:value-of select="name(.)" />
- <xsl:if test="parent::*">
<xsl:text>in</xsl:text>
<xsl:value-of select="name(parent::*)" />
</xsl:if>
<xsl:text>.</xsl:text>
</xsl:message>
- <font color="red">
<xsl:text><</xsl:text>
<xsl:value-of select="name(.)" />
<xsl:text>></xsl:text>
<xsl:apply-templates />
<xsl:text></</xsl:text>
<xsl:value-of select="name(.)" />
<xsl:text>></xsl:text>
</font>
</xsl:template>
- <xsl:template match="text()">
<xsl:value-of select="." />
</xsl:template>
- <xsl:template name="body.attributes">
<xsl:attribute name="bgcolor">white</xsl:attribute>
<xsl:attribute name="text">black</xsl:attribute>
<xsl:attribute name="link">#0000FF</xsl:attribute>
<xsl:attribute name="vlink">#840084</xsl:attribute>
<xsl:attribute name="alink">#0000FF</xsl:attribute>
</xsl:template>
- <xsl:template name="head.content">
<xsl:param name="node" select="." />
- <xsl:param name="title">
<xsl:apply-templates select="$node" mode="object.title.markup.textonly" />
</xsl:param>
- <title>
<xsl:copy-of select="$title" />
</title>
- <xsl:if test="$html.stylesheet != ''">
- <xsl:call-template name="output.html.stylesheets">
<xsl:with-param name="stylesheets" select="normalize-space($html.stylesheet)" />
</xsl:call-template>
</xsl:if>
- <xsl:if test="$link.mailto.url != ''">
<link rev="made" href="{$link.mailto.url}" />
</xsl:if>
- <xsl:if test="$html.base != ''">
<base href="{$html.base}" />
</xsl:if>
<meta name="generator" content="DocBook XSL Stylesheets V{$VERSION}" />
- <xsl:if test="$generate.meta.abstract != 0">
<xsl:variable name="info" select="(articleinfo |bookinfo |prefaceinfo |chapterinfo |appendixinfo |sectioninfo |sect1info |sect2info |sect3info |sect4info |sect5info |referenceinfo |refentryinfo |partinfo |info |docinfo)[1]" />
- <xsl:if test="$info and $info/abstract">
- <meta name="description">
- <xsl:attribute name="content">
- <xsl:for-each select="$info/abstract[1]/*">
<xsl:value-of select="." />
- <xsl:if test="position() < last()">
<xsl:text />
</xsl:if>
</xsl:for-each>
</xsl:attribute>
</meta>
</xsl:if>
</xsl:if>
- <xsl:if test="($draft.mode = 'yes' or ($draft.mode = 'maybe' and ancestor-or-self::*[@status][1]/@status = 'draft')) and $draft.watermark.image != ''">
- <style type="text/css">
<xsl:text>body { background-image: url('</xsl:text>
<xsl:value-of select="$draft.watermark.image" />
<xsl:text>'); background-repeat: no-repeat; background-position: top left; /* The following properties make the watermark "fixed" on the page. */ /* I think that's just a bit too distracting for the reader... */ /* background-attachment: fixed; */ /* background-position: center center; */ }</xsl:text>
</style>
</xsl:if>
<xsl:apply-templates select="." mode="head.keywords.content" />
</xsl:template>
- <xsl:template name="output.html.stylesheets">
<xsl:param name="stylesheets" select="''" />
- <xsl:choose>
- <xsl:when test="contains($stylesheets, ' ')">
- <link rel="stylesheet" href="{substring-before($stylesheets, ' ')}">
- <xsl:if test="$html.stylesheet.type != ''">
- <xsl:attribute name="type">
<xsl:value-of select="$html.stylesheet.type" />
</xsl:attribute>
</xsl:if>
</link>
- <xsl:call-template name="output.html.stylesheets">
<xsl:with-param name="stylesheets" select="substring-after($stylesheets, ' ')" />
</xsl:call-template>
</xsl:when>
- <xsl:when test="$stylesheets != ''">
- <link rel="stylesheet" href="{$stylesheets}">
- <xsl:if test="$html.stylesheet.type != ''">
- <xsl:attribute name="type">
<xsl:value-of select="$html.stylesheet.type" />
</xsl:attribute>
</xsl:if>
</link>
</xsl:when>
</xsl:choose>
</xsl:template>
- <!-- ============================================================
-->
- <xsl:template match="*" mode="head.keywords.content">
<xsl:apply-templates select="chapterinfo/keywordset" mode="html.header" />
<xsl:apply-templates select="appendixinfo/keywordset" mode="html.header" />
<xsl:apply-templates select="prefaceinfo/keywordset" mode="html.header" />
<xsl:apply-templates select="bookinfo/keywordset" mode="html.header" />
<xsl:apply-templates select="setinfo/keywordset" mode="html.header" />
<xsl:apply-templates select="articleinfo/keywordset" mode="html.header" />
<xsl:apply-templates select="artheader/keywordset" mode="html.header" />
<xsl:apply-templates select="sect1info/keywordset" mode="html.header" />
<xsl:apply-templates select="sect2info/keywordset" mode="html.header" />
<xsl:apply-templates select="sect3info/keywordset" mode="html.header" />
<xsl:apply-templates select="sect4info/keywordset" mode="html.header" />
<xsl:apply-templates select="sect5info/keywordset" mode="html.header" />
<xsl:apply-templates select="refsect1info/keywordset" mode="html.header" />
<xsl:apply-templates select="refsect2info/keywordset" mode="html.header" />
<xsl:apply-templates select="refsect3info/keywordset" mode="html.header" />
<xsl:apply-templates select="bibliographyinfo/keywordset" mode="html.header" />
<xsl:apply-templates select="glossaryinfo/keywordset" mode="html.header" />
<xsl:apply-templates select="indexinfo/keywordset" mode="html.header" />
<xsl:apply-templates select="refentryinfo/keywordset" mode="html.header" />
<xsl:apply-templates select="partinfo/keywordset" mode="html.header" />
<xsl:apply-templates select="referenceinfo/keywordset" mode="html.header" />
<xsl:apply-templates select="docinfo/keywordset" mode="html.header" />
<xsl:apply-templates select="info/keywordset" mode="html.header" />
- <xsl:if test="$inherit.keywords != 0 and parent::*">
<xsl:apply-templates select="parent::*" mode="head.keywords.content" />
</xsl:if>
</xsl:template>
- <!-- ============================================================
-->
- <xsl:template name="system.head.content">
<xsl:param name="node" select="." />
- <!--
FIXME: When chunking, only the annotations actually used
in this chunk should be referenced. I don't think it
does any harm to reference them all, but it adds
unnecessary bloat to each chunk.

-->
- <xsl:if test="$annotation.support != 0 and //annotation">
<xsl:call-template name="add.annotation.links" />
- <script type="text/javascript">
<xsl:text>// Create PopupWindow objects</xsl:text>
- <xsl:for-each select="//annotation">
<xsl:text>var popup_</xsl:text>
<xsl:value-of select="generate-id(.)" />
<xsl:text>= new PopupWindow("popup-</xsl:text>
<xsl:value-of select="generate-id(.)" />
<xsl:text>");</xsl:text>
<xsl:text>popup_</xsl:text>
<xsl:value-of select="generate-id(.)" />
<xsl:text>.offsetY = 15;</xsl:text>
<xsl:text>popup_</xsl:text>
<xsl:value-of select="generate-id(.)" />
<xsl:text>.autoHide();</xsl:text>
</xsl:for-each>
</script>
- <style type="text/css">
<xsl:value-of select="$annotation.css" />
</style>
</xsl:if>
- <!--
system.head.content is like user.head.content, except that
it is called before head.content. This is important because it
means, for example, that <style> elements output by system.head.content
have a lower CSS precedence than the users stylesheet.

-->
</xsl:template>
- <!-- ============================================================
-->
- <xsl:template name="user.preroot">
- <!-- Pre-root output, can be used to output comments and PIs.
-->
- <!-- This must not output any element content!
-->
</xsl:template>
- <xsl:template name="user.head.content">
<xsl:param name="node" select="." />
</xsl:template>
- <xsl:template name="user.header.navigation">
<xsl:param name="node" select="." />
</xsl:template>
- <xsl:template name="user.header.content">
<xsl:param name="node" select="." />
</xsl:template>
- <xsl:template name="user.footer.content">
<xsl:param name="node" select="." />
</xsl:template>
- <xsl:template name="user.footer.navigation">
<xsl:param name="node" select="." />
</xsl:template>
- <xsl:template match="/">
- <xsl:choose>
- <xsl:when test="function-available('exsl:node-set') and (*/self::ng:* or */self::db:*)">
- <!--
Hack! If someone hands us a DocBook V5.x or DocBook NG document,
toss the namespace and continue. Someday we'll reverse this logic
and add the namespace to documents that don't have one.
But not before the whole stylesheet has been converted to use
namespaces. i.e., don't hold your breath

-->
<xsl:message>Stripping NS from DocBook 5/NG document.</xsl:message>
- <xsl:variable name="nons">
<xsl:apply-templates mode="stripNS" />
</xsl:variable>
<xsl:message>Processing stripped document.</xsl:message>
<xsl:apply-templates select="exsl:node-set($nons)" />
</xsl:when>
- <xsl:eek:therwise>
- <xsl:choose>
- <xsl:when test="$rootid != ''">
- <xsl:choose>
- <xsl:when test="count(key('id',$rootid)) = 0">
- <xsl:message terminate="yes">
<xsl:text>ID '</xsl:text>
<xsl:value-of select="$rootid" />
<xsl:text>' not found in document.</xsl:text>
</xsl:message>
</xsl:when>
- <xsl:eek:therwise>
- <xsl:if test="$collect.xref.targets = 'yes' or $collect.xref.targets = 'only'">
<xsl:apply-templates select="key('id', $rootid)" mode="collect.targets" />
</xsl:if>
- <xsl:if test="$collect.xref.targets != 'only'">
<xsl:apply-templates select="key('id',$rootid)" mode="process.root" />
- <xsl:if test="$tex.math.in.alt != ''">
<xsl:apply-templates select="key('id',$rootid)" mode="collect.tex.math" />
</xsl:if>
</xsl:if>
</xsl:eek:therwise>
</xsl:choose>
</xsl:when>
- <xsl:eek:therwise>
- <xsl:if test="$collect.xref.targets = 'yes' or $collect.xref.targets = 'only'">
<xsl:apply-templates select="/" mode="collect.targets" />
</xsl:if>
- <xsl:if test="$collect.xref.targets != 'only'">
<xsl:apply-templates select="/" mode="process.root" />
- <xsl:if test="$tex.math.in.alt != ''">
<xsl:apply-templates select="/" mode="collect.tex.math" />
</xsl:if>
</xsl:if>
</xsl:eek:therwise>
</xsl:choose>
</xsl:eek:therwise>
</xsl:choose>
</xsl:template>
- <xsl:template match="*" mode="process.root">
<xsl:variable name="doc" select="self::*" />
<xsl:call-template name="user.preroot" />
<xsl:call-template name="root.messages" />
- <html>
- <head>
- <xsl:call-template name="system.head.content">
<xsl:with-param name="node" select="$doc" />
</xsl:call-template>
- <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>
- <xsl:template name="root.messages">
- <!-- redefine this any way you'd like to output messages
-->
- <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE
-->
</xsl:template>
- <!-- ====================================================================
-->
- <xsl:template name="chunk">
<xsl:param name="node" select="." />
- <!-- The default is that we are not chunking...
-->
<xsl:text>0</xsl:text>
</xsl:template>
- <!-- ====================================================================
-->
- <xsl:template match="*" mode="stripNS">
- <xsl:choose>
- <xsl:when test="self::ng:* or self::db:*">
- <xsl:element name="{local-name(.)}">
<xsl:copy-of select="@*" />
<xsl:apply-templates mode="stripNS" />
</xsl:element>
</xsl:when>
- <xsl:eek:therwise>
- <xsl:copy>
<xsl:copy-of select="@*" />
<xsl:apply-templates mode="stripNS" />
</xsl:copy>
</xsl:eek:therwise>
</xsl:choose>
</xsl:template>
- <xsl:template match="ng:link|db:link" mode="stripNS">
<xsl:variable xmlns:xlink=" name="href" select="@xlink:href|@href" />
- <xsl:choose>
- <xsl:when test="$href != '' and not(starts-with($href,'#'))">
- <ulink url="{$href}">
- <xsl:for-each select="@*">
- <xsl:if test="local-name(.) != 'href'">
<xsl:copy />
</xsl:if>
</xsl:for-each>
<xsl:apply-templates mode="stripNS" />
</ulink>
</xsl:when>
- <xsl:when test="$href != '' and starts-with($href,'#')">
- <link linkend="{substring-after($href,'#')}">
- <xsl:for-each select="@*">
- <xsl:if test="local-name(.) != 'href'">
<xsl:copy />
</xsl:if>
</xsl:for-each>
<xsl:apply-templates mode="stripNS" />
</link>
</xsl:when>
- <xsl:eek:therwise>
- <link>
<xsl:copy-of select="@*" />
<xsl:apply-templates mode="stripNS" />
</link>
</xsl:eek:therwise>
</xsl:choose>
</xsl:template>
- <xsl:template match="comment()|processing-instruction()|text()" mode="stripNS">
<xsl:copy />
</xsl:template>
- <!-- ====================================================================
-->
</xsl:stylesheet>


Here is the output:
I couldn't paste the figure.
But all figures in the XML file shows as follows:

Figure 1.1. Wireless Reality in the top menu

< Actutal Figure Here >

What I would like is the following output (Figure first and at the bottom shows the title of the figure.

< Actutal Figure Here >

Figure 1.1. Wireless Reality in the top menu

Thanks a lot!
Raj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top