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]

Re: [docbook-apps] Re: Customisation layer


----- Original Message ----- 
From: "Michael Smith" <smith@xml-doc.org>
To: "Aidan Lister" <aidanis@gmail.com>
Cc: <docbook-apps@lists.oasis-open.org>
Sent: Monday, December 06, 2004 2:55 AM
Subject: Re: [docbook-apps] Re: Customisation layer


>
> > > 3) Why is <email> transformed into <code class="email">! This doesn't
> > > make sense.
>
> hmm, do you want it to be transformed into <a href="mailto:foo@bar.com";> ?
> I though it already did that by default. Is it not doing that?
>
> If it's not, you can get the same effect by doing:
>
>   <email><ulink url="mailto:foo@bar.com";>foo@bar.com</ulink></email>

email does get the <a href>.  I think perhaps he wants it as plain text
rather than <code>. If so, then this template will do it (replaces
inline.monoseq with inline.charseq):

<xsl:template match="email">
  <xsl:call-template name="inline.charseq">
    <xsl:with-param name="content">
      <xsl:text>&lt;</xsl:text>
      <a>
       <xsl:attribute name="href">mailto:<xsl:value-of
select="."/></xsl:attribute>
       <xsl:apply-templates/>
      </a>
      <xsl:text>&gt;</xsl:text>
    </xsl:with-param>
  </xsl:call-template>
</xsl:template>

> > > 4) How do I turn off generation of named ids?
> > >
> > > I'm happy for sections with an ID element to be given a named anchor -
> > > not that they need to, wouldn't it make more sense just to assign the
> > > ID to the actual element, it works the same
> > >
> > > But, some things in my document have an ID generated, like the <h1>
> > > element. I don't see a purpose for this, is there a parameter I can
> > > use to disable it?
>
> I think not. I will check (if nobody else from the project chimes
> in first to confirm it).

The stylesheets will be switching over to using id attributes, probably in
the next release.

The purpose for many of the named anchors is so that the table of contents
can have a link that works.

> > >
> > > 5) I've been hunting around, but I'm unable to find a way to
> > > automagically scale all images to a maximum width. Is there a
> > > parameter for this in the docbook xsl?
>
> Dunno. I but Bob does, though.

It depends on if you are using FOP or not.  There is a default.image.width
parameter that you could try.

> > 6) Citations.
> >
> > At the very top of my article, I must include a self-citation. This is
> > pretty standard when writing articles, perhaps it could be added to
> > docbook one day. At any rate, I decided to add it into my
> > customisation layer.
> >
> > The problem I'm having is that I'm using the chunker (which is
> > fantastic), but I don't want the citation appearing at the top of
> > every page, so editing the <xsl:template name="chunk-element-content">
> > is no good. I either need a way to edit the first chunk's template, or
> > a way to test if the current chunk being processed is the first one.
> >
> > Any advice appreciated.
>
> Dunno on this either. I will check on this too. If it turns out
> that it's not possible, you'll need to file a feature request.

I don't know what a self-citation is. Is that the title? Generally the start
of an article is handled by the titlepage templates.  It sounds like you
want it there, and not in the headers that are repeated on each page?

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net



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