forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Schaefer <johannes.schae...@uidesign.de>
Subject Re: Appling CSS class to the source tag in apache doc
Date Tue, 15 Feb 2005 16:13:05 GMT
 >         <xsl:apply-templates select="@class"/>, code

shouldn't it be without the comma?
 >         <xsl:apply-templates select="@class"/> code

at least like this I can set attributes for the
original class-attribute and "code" with firefox:
pre.code {...}
pre.whatever {...}

Maybe this is browser-dependent?

Cheers,
Johannes


Ross Gardler wrote:
> Stefan Baramov wrote:
> 
>> May be I am mistaken but the class attribute of "source" tag does not
>> work in Forrest 0.6 for the "pelt" skin.
>> I have an xml file defined like this
>>
>> <source class="my_class">
>>     My pre
>>         formatted             text
>> </source>
>>
>> This always will result in
>> <pre class="code">
>>     My pre
>>         formatted             text
>> </pre>
>>
>> Notice, that instead of "my_class" the "code" class is used. My question
>> is why? Is this skin specific? Or a bug? 
> 
> 
> The source tag has a specific meaning hence the class="code" attribute. 
> However, the skin should really allow the user to pass class information 
>  in the way you illustrate in order to allow custom styling. I would 
> consider this a bug, please file a bug report.
> 
> I think a solution is to change the following in 
> main/webapp/skins/common/html/document2html.xsl:
> 
>   <xsl:template match="source">
>     <xsl:apply-templates select="@id"/>
>     <pre class="code">
> 
> to:
> 
>   <xsl:template match="source">
>     <xsl:apply-templates select="@id"/>
>     <pre>
>     <xsl:attribute name="class">
>         <xsl:apply-templates select="@class"/>, code
>     </xsl:attribute>
> 
> Please test it and let us know if this works.
> 
> Ross
> 
> 
> 


-- 
User Interface Design GmbH * Teinacher Str. 38 * D-71634 
Ludwigsburg
Fon +49 (0)7141 377 000 * Fax  +49 (0)7141 377 00-99
Geschäftsstelle: User Interface Design GmbH * 
Lehrer-Götz-Weg 11 * D-81825 München
www.uidesign.de

Buch "User Interface Tuning" von Joachim Machate & Michael 
Burmester
www.user-interface-tuning.de

Besuchen Sie uns auf der Hannover Messe 11.-15. April 2005
Halle 2, Stand C14 auf dem MMI Gemeinschaftsstand
www.uidesign.de/hmi2005

Nächstes TAE-Seminar zu User Interface Design
Ostfildern-Nellingen, 07.-08. April 2005
www.tae.de TAE-Veranstaltung Nr. 31189

Mime
View raw message