forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Schaefer <johannes.schae...@uidesign.de>
Subject how to include additional classes (e.g. from sdocbook)
Date Tue, 29 Nov 2005 14:49:15 GMT
I'd definitely like to know the opinion of other developers.
I didn't think this was controversal.

I'm (back) working on another style guide and we're doing it in
sDocBook. So I'm very likely to enhance support for it. Since
sDocBook offers a richer vocabulary than xdoc I'll need to include
some information in classes, e.g.

  sDocBook  --Forrest--> HTML
  <literal> -----------> <span class="codefrag">
  <userinput> ---------> the same

  <figure>  -----------> <table class="ForrestTable">
  <informaltable> -----> the same

I would add classes to the sdocbook-plugin's output that preserve
the more detailed information, e.g.
  <literal> -- sdocbook-plugin -->
    --> <code class="literal"> -- document-to-html.xsl -->
          --> <span class="codefrag literal">

These classes get lost in Forrest's output stage, so, I'll have to
add them to a number of elements. I did the commit below to see if
anybody objects. And Thorsten did.

I still cannot see the "nightmare" that Thorsten mentioned.
Thorsten, can you explain what you mean?
What do others think?

Johannes

Johannes Schaefer schrieb:
<snip/>
>>Thorsten Scherler schrieb:
>>
>>
>>>El lun, 28-11-2005 a las 17:48 +0000, josch@apache.org escribió:
>>>
>>>
>>>
>>>>Author: josch
>>>>Date: Mon Nov 28 09:48:30 2005
>>>>New Revision: 349444
>>>>
>>>>URL: http://svn.apache.org/viewcvs?rev=349444&view=rev
>>>>Log:
>>>>make <code> respect @class; used to differentiate e.g. from sdocbook's
<userinput>, <literal>
>>>>
>>>>Modified:
>>>>  forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl
>>>>
>>>>Modified: forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl
>>>>URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl?rev=349444&r1=349443&r2=349444&view=diff
>>>>==============================================================================
>>>>--- forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl
(original)
>>>>+++ forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl
Mon Nov 28 09:48:30 2005
>>>>@@ -227,7 +227,7 @@
>>>>
>>>> <xsl:template match="code">
>>>>   <xsl:apply-templates select="@id"/>
>>>>-    <span class="codefrag">
>>>>+    <span class="codefrag {@class}">
>>>
>>>
>>>That is not really css friendly. Please use:
>>>+    <span class="codefrag-{@class}">
>>
>>
>>I did it like this to leave the other *.css definitions
>>untouched.
>>
>>
>>
>>>Otherwise it is a nightmare in the *.css.
>>
>>
>>Don't understand why, it's one of the features of CSS,
>>see e.g.
>> http://dhtmlkitchen.com/learn/css/multiclass/
>> (The example there is not very useful, though)
>>
>>I added this to skinconf/extra-css:
>>
>>  .literal { font-weight:bold; }
>>
>>which gives me nicely monospaced + bold for <literal>
>>
>>Still objecting?
>>Johannes
>>
>>
>>
>>>salu2
>>>
>>>
>>>
>>>
>>>>     <xsl:copy-of select="@id"/>
>>>>     <xsl:value-of select="."/>
>>>>   </span>
>>>>
>>>>
>>
> 
> 


-- 
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

Mime
View raw message