On Nov 14, 2007 11:30 AM, Bob Stayton <[EMAIL PROTECTED]> wrote:
> [moving this over to the docbook-apps mailing list where such topics are
> discussed]
>
> I think when Norm Walsh designed the nested div elements in the titlepage
> mechanism for HTML, he was allowing for customization of attributes at
> each
> level of nesting. But since most people don't do such customization with
> XSL (they use CSS instead), then they become a lot of baggage. This
> customization trims down section output a bit:
>
> <xsl:template name="section.titlepage">
> <xsl:call-template name="section.titlepage.before.recto"/>
> <xsl:call-template name="section.titlepage.recto"/>
> <xsl:call-template name="section.titlepage.before.verso"/>
> <xsl:call-template name="section.titlepage.verso"/>
> <xsl:call-template name="section.titlepage.separator"/>
> </xsl:template>
>
> <xsl:template match="section" mode="class.attribute">
> <xsl:attribute name="id">
> <xsl:call-template name="object.id"/>
> </xsl:attribute>
> </xsl:template>
>
It looks correct, but isn't working for me:
<div class="section" lang="en" xml:lang="en">
<h2 class="title" style="clear: both"><a
id="the_title"></a>Title</h2>
<p>The description</p>
</div>
I want to remove that <a id> generation and put the id on the outer <div>
> <xsl:template match="title" mode="section.titlepage.recto.auto.mode">
> <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
> </xsl:template>
>
> The first template is a copy of the section.titlepage template from the
> generated html/titlepage.templates.xsl file, but stripped down to
> essentials.
>
> The second template puts the id on the outer div element, instead of on
> the
> title div.
>
> The last one eliminates the extra div around the h2.
>
> Bob Stayton
> Sagehill Enterprises
> DocBook Consulting
> [EMAIL PROTECTED]
>
>
> ----- Original Message -----
> From: "Anthony Ettinger" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, November 13, 2007 2:33 PM
> Subject: [docbook] how do i get a common parent with a unique id?
>
>
> >I dont' much care for the <section><title>...</title></section> html
> > that is output...all I really need is to a unqiue id on an html tag
> > with the content as children.
> >
> > something like would suffice:
> >
> > <div id="foo">
> > <h2>Title</h2>
> > <p>My paragraphs</p>
> > <p>My paragraphs</p>
> > </div>
> >
> > I have come to a block in my quest of customizing <title> markup as
> > explained here: http://www.sagehill.net/docbookxsl/HTMLTitlePage.html
> >
> > The template/titlepage.xsl is not obvious to me, other than declaring
> > a bunch of parameters, used elsewhere...how it is generating:
> >
> > <div class="titlepage">
> > <div>
> > <div>
> > <a name="foo"></a><h2>Title</h2>
> > </div>
> > </div>
> > <p>My paragaphs</p>
> > </div>
> >
> > --
> > Anthony Ettinger
> > Ph: 408-656-2473
> > var (bonita, farley) = new Dog;
> > farley.barks("very loud");
> > bonita.barks("at strangers");
> >
> > http://chovy.dyndns.org/resume/
> > http://utuxia.com/consulting
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
>
--
Anthony Ettinger
Ph: 408-656-2473
var (bonita, farley) = new Dog;
farley.barks("very loud");
bonita.barks("at strangers");
http://chovy.dyndns.org/resume/
http://utuxia.com/consulting