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] Applying a class to the result of an itemizedlist


I don't know about the DSSSL stylesheets, but you can accomplish it with
a customization like this in XSL.  Copy the template with
match="itemizedlist"
from html/lists.xsl to your customization file, and add these lines after
the
<ul> opening tag in the template:

<ul>
  <xsl:if test="@role">
    <xsl:attribute name="class"><xsl:value-of
select="@role"/></xsl:attribute>
  </xsl:if>

The the value of any role attribute added to an itemizedlist element will
appear as the class attribute in the <ul>.  For example:

<itemizedlist role="centralized">

will become:

<ul class="centralized">

Keep in mind that when you copy a whole template and modify it, then
you will need to check new stylesheet versions to see if that template has
changed, and redo your customization if it has.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- 
From: "Shlomi Fish" <shlomif@vipe.stud.technion.ac.il>
To: "DocBook Apps" <docbook-apps@lists.oasis-open.org>
Sent: Thursday, January 29, 2004 8:57 PM
Subject: [docbook-apps] Applying a class to the result of an itemizedlist


>
> Hi all!
>
> I would like the HTML of a specific itemizedlist (and not any other) to
> have a class="centralized" attribute. How can I achieve this using the
> XSL stylesheets? How can it be achieved using the DSSSL stylesheets?
>
> Regards,
>
> Shlomi Fish
>
> ----------------------------------------------------------------------
> Shlomi Fish        shlomif@vipe.technion.ac.il
> Home Page:         http://t2.technion.ac.il/~shlomif/
>
> You are banished! You are banished! You are banished!
>
> Hey? I'm just kidding!
>
> To unsubscribe from this list, send a post to
docbook-apps-unsubscribe@lists.oasis-open.org, or visit
http://www.oasis-open.org/mlmanage/.
>
>
>



To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.


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