OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] How to generate <li><a href="xx">..</a></li>?


In general, suppressing <p> in listitem output would be a problem because a listitem 
can contain any number of para or block elements, and they need some HTML elements 
like <p> to separate them.

However, in the case of a single para in a listitem, you can suppress the <p> tags 
with the following customization for orderedlist:

<xsl:template match="orderedlist/listitem/para
                           [count(preceding-sibling::*) = 0 and
                            count(following-sibling::*) = 0]">
  <xsl:apply-templates/>
</xsl:template>

and something similar for itemizedlist.  This template will be used on a listitem/para 
when it has no sibling elements.  It skips generating the <p> tags and just outputs 
the content of the para.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- 
From: "Tao Wang" <dancefire@gmail.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Wednesday, May 12, 2010 11:49 PM
Subject: [docbook-apps] How to generate <li><a href="xx">..</a></li>?


> Hi,
>
> I'm using docbook 4.5 xhtml stylesheet xsl to generate html files. I
> want to have a list of links, which should be:
>
> -------------------
> <li><a href="xxx">...</a></li>
> <li><a href="xxx">...</a></li>
> <li><a href="xxx">...</a></li>
> -------------------
>
> So, I use
> ============
> <listitem><para><ulink url="xxx">...</ulink></para></listitem>
> <listitem><para><ulink url="xxx">...</ulink></para></listitem>
> <listitem><para><ulink url="xxx">...</ulink></para></listitem>
> ============
>
> However, it generates following result
> ============
> <li><p><a href="xxx">...</a></p></li>
> <li><p><a href="xxx">...</a></p></li>
> <li><p><a href="xxx">...</a></p></li>
> ============
>
> I do not want <p> there. How can I generate the list of links without <p>?
>
> -- 
> Regards
>
> Tao Wang
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>
> 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]