You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by jo...@apache.org on 2005/11/28 18:48:41 UTC

svn commit: r349444 - /forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl

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}">
       <xsl:copy-of select="@id"/>
       <xsl:value-of select="."/>
     </span>



Re: how to include additional classes (e.g. from sdocbook)

Posted by Thorsten Scherler <th...@apache.org>.
Like said before I may have confused the issues in my head.

+1 for your commits and thx for the links and explanation.

salu2

El mar, 29-11-2005 a las 18:00 +0100, Johannes Schaefer escribió:
> Hi!
> 
> We need to differntiate two things: HTML and CSS.
> 
> In HTML all elements may have *more than one class* assigned,
> like
>   <p class="quote poem">
> 
> In CSS these may be formatted independently like Ross pointed out:
>   .quote {text-indent: 3em;}
>   .poem  {text-align: center;}
> 
> In CSS: If you do
>   .quote .poem { text-indent: 3em; text-align: center; }
> this means something different:
>   "elements with class 'poem' *below* elements with class 'quote'"
> 
> Note that " " (Space) means something different in HTML and CSS.
> 
> So, I believe that my suggestion/commit is perfectly fine.
> 
> The best reference I know is [0] (unfortunately mostly in German),

> esp. the "Kurzreferenz HTML/CSS".
> About browsers not supporting see [1].
> Other references below.
> 
> Johannes
> 
> [0] http://www.selfhtml.org/ (unfortunately mostly in German)
> [1] http://css-discuss.incutio.com/?page=MultipleClasses
> [2] http://www.quirksmode.org/css/multipleclasses.html
> [3] http://dhtmlkitchen.com/learn/css/multiclass/
> [4] http://www.w3.org/TR/html401/struct/global.html#h-7.5.2
> [5] http://www.w3.org/TR/REC-CSS2/selector.html
> 
> 
> Ferdinand Soethe schrieb:
> > Hi Johannes,
> > 
> > glad you brought this up as I was playing with the idea of using it as
> > well.
> > 
> > And I had the same question marks about browsers not supporting
> > it. But I'd use it anyway and expect browsers to live up to standards.
> > Especially if there are very few other options to do what you are
> > trying to do.
> > 
> > --
> > Ferdinand Soethe
> > 
> > 
> 
> 
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: how to include additional classes (e.g. from sdocbook)

Posted by Johannes Schaefer <jo...@uidesign.de>.
Hi!

We need to differntiate two things: HTML and CSS.

In HTML all elements may have *more than one class* assigned,
like
  <p class="quote poem">

In CSS these may be formatted independently like Ross pointed out:
  .quote {text-indent: 3em;}
  .poem  {text-align: center;}

In CSS: If you do
  .quote .poem { text-indent: 3em; text-align: center; }
this means something different:
  "elements with class 'poem' *below* elements with class 'quote'"

Note that " " (Space) means something different in HTML and CSS.

So, I believe that my suggestion/commit is perfectly fine.

The best reference I know is [0] (unfortunately mostly in German),
esp. the "Kurzreferenz HTML/CSS".
About browsers not supporting see [1].
Other references below.

Johannes

[0] http://www.selfhtml.org/ (unfortunately mostly in German)
[1] http://css-discuss.incutio.com/?page=MultipleClasses
[2] http://www.quirksmode.org/css/multipleclasses.html
[3] http://dhtmlkitchen.com/learn/css/multiclass/
[4] http://www.w3.org/TR/html401/struct/global.html#h-7.5.2
[5] http://www.w3.org/TR/REC-CSS2/selector.html


Ferdinand Soethe schrieb:
> Hi Johannes,
> 
> glad you brought this up as I was playing with the idea of using it as
> well.
> 
> And I had the same question marks about browsers not supporting
> it. But I'd use it anyway and expect browsers to live up to standards.
> Especially if there are very few other options to do what you are
> trying to do.
> 
> --
> Ferdinand Soethe
> 
> 


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

Re: how to include additional classes (e.g. from sdocbook)

Posted by Ross Gardler <rg...@apache.org>.
Ferdinand Soethe wrote:
> Hi Johannes,
> 
> glad you brought this up as I was playing with the idea of using it as
> well.
> 
> And I had the same question marks about browsers not supporting
> it. But I'd use it anyway and expect browsers to live up to standards.
> Especially if there are very few other options to do what you are
> trying to do.

I've not done any formal testing, but I have been using this technique 
in one of my content objects and have had no reports of problems (only a 
couple of hundred users though, so it may be they al use the same browser)

Ross

Re: how to include additional classes (e.g. from sdocbook)

Posted by Ferdinand Soethe <fe...@apache.org>.
Hi Johannes,

glad you brought this up as I was playing with the idea of using it as
well.

And I had the same question marks about browsers not supporting
it. But I'd use it anyway and expect browsers to live up to standards.
Especially if there are very few other options to do what you are
trying to do.

--
Ferdinand Soethe


Re: how to include additional classes (e.g. from sdocbook)

Posted by Ross Gardler <rg...@apache.org>.
Johannes Schaefer wrote:
> I'm (back) working on another style guide and we're doing it in
> sDocBook. 

Welcome back :-))

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

I was awaiting Thorstens response to your response, assuming that he had 
misread what you were doing. I don't see a problem with it either.

Ross

Re: how to include additional classes (e.g. from sdocbook)

Posted by Thorsten Scherler <th...@apache.org>.
El mar, 29-11-2005 a las 15:37 +0000, Ross Gardler escribió:
> Thorsten Scherler wrote:
> > Sorry, I am too busy atm to show you the commit messages regarding this
> > issue. I only have in the back of my head some committs around this
> > topic stating, what said.
> > 
> > If I have this issue wrong in my head then sorry, but AFAIK 
> > .codefrag literal{}
> > stands for:
> > class="codefrag" element="literal"
> 
> Yes, but can 't the CSS also have:
> 
> .codefrag {
>    ...
> }
> 
> .literal {
>    ...
> }


Maybe that was the solution for the problem. ;-)

> > maybe better with a more explicit sample:
> > <span class="codefrag p">
> > gives 
> > .codefrag p{}
> > which stands for 
> > class="codefrag" element="p"
> > 
> > which would design all elements within e.g.
> > <div class="codefrag">
> >  <p>this</p>
> > </div>
> > 
> > ...or am I wrong?
> 
> I think you are right, but the problem is one of naming conventions. The 
> class elements must not be the name of a legal HTML element in order to 
> avoid the side effect that Thorsten describes.
> 
> Or am *I* wrong?
> 

Hmm, or it have to be defined like you describe above. Still wondering
whether all browser support class="some class otherClass" style and
display the design right.

> Ross

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: how to include additional classes (e.g. from sdocbook)

Posted by Ross Gardler <rg...@apache.org>.
Johannes Schaefer wrote:
> 
> Ross Gardler schrieb:
> 
>>Thorsten Scherler wrote:

...

>>>maybe better with a more explicit sample:
>>><span class="codefrag p">
>>>gives .codefrag p{}
>>>which stands for class="codefrag" element="p"
>>>
>>>which would design all elements within e.g.
>>><div class="codefrag">
>>> <p>this</p>
>>></div>
>>>
>>>...or am I wrong?
>>
>>
>>I think you are right, but the problem is one of naming conventions. The
>>class elements must not be the name of a legal HTML element in order to
>>avoid the side effect that Thorsten describes.
> 
> 
> I haven't got this, do you mean something like
>   <p class="code" id="body">?

No, that's not what I meant, but my thinking was flawed anyway. Ignore 
this statement.

Ross

Re: how to include additional classes (e.g. from sdocbook)

Posted by Johannes Schaefer <jo...@uidesign.de>.

Ross Gardler schrieb:
> Thorsten Scherler wrote:
> 
>> Sorry, I am too busy atm to show you the commit messages regarding this
>> issue. I only have in the back of my head some committs around this
>> topic stating, what said.
>>
>> If I have this issue wrong in my head then sorry, but AFAIK .codefrag
>> literal{}
>> stands for:
>> class="codefrag" element="literal"
> 
> 
> Yes, but can 't the CSS also have:
> 
> .codefrag {
>   ...
> }
> 
> .literal {
>   ...
> }
> 
>> maybe better with a more explicit sample:
>> <span class="codefrag p">
>> gives .codefrag p{}
>> which stands for class="codefrag" element="p"
>>
>> which would design all elements within e.g.
>> <div class="codefrag">
>>  <p>this</p>
>> </div>
>>
>> ...or am I wrong?
> 
> 
> I think you are right, but the problem is one of naming conventions. The
> class elements must not be the name of a legal HTML element in order to
> avoid the side effect that Thorsten describes.

I haven't got this, do you mean something like
  <p class="code" id="body">?

CSS is perfectly clear about this:
  elements without "." (dot)
  classes with "."
  (ids with "#")
e.g.
  p.code {font-family: courier;}
  code   {font-family: Helvetica;}
  #body  {font-family: Times}
should work fine.

Johannes

> 
> Or am *I* wrong?
> 
> 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

Re: how to include additional classes (e.g. from sdocbook)

Posted by Ross Gardler <rg...@apache.org>.
Thorsten Scherler wrote:
> Sorry, I am too busy atm to show you the commit messages regarding this
> issue. I only have in the back of my head some committs around this
> topic stating, what said.
> 
> If I have this issue wrong in my head then sorry, but AFAIK 
> .codefrag literal{}
> stands for:
> class="codefrag" element="literal"

Yes, but can 't the CSS also have:

.codefrag {
   ...
}

.literal {
   ...
}

> maybe better with a more explicit sample:
> <span class="codefrag p">
> gives 
> .codefrag p{}
> which stands for 
> class="codefrag" element="p"
> 
> which would design all elements within e.g.
> <div class="codefrag">
>  <p>this</p>
> </div>
> 
> ...or am I wrong?

I think you are right, but the problem is one of naming conventions. The 
class elements must not be the name of a legal HTML element in order to 
avoid the side effect that Thorsten describes.

Or am *I* wrong?

Ross

Re: how to include additional classes (e.g. from sdocbook)

Posted by Thorsten Scherler <th...@apache.org>.
Sorry, I am too busy atm to show you the commit messages regarding this
issue. I only have in the back of my head some committs around this
topic stating, what said.

If I have this issue wrong in my head then sorry, but AFAIK 
.codefrag literal{}
stands for:
class="codefrag" element="literal"

maybe better with a more explicit sample:
<span class="codefrag p">
gives 
.codefrag p{}
which stands for 
class="codefrag" element="p"

which would design all elements within e.g.
<div class="codefrag">
 <p>this</p>
</div>

...or am I wrong?

salu2

El mar, 29-11-2005 a las 15:49 +0100, Johannes Schaefer escribió:
> 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>
> >>>>
> >>>>
> >>
> > 
> > 
> 
> 
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


how to include additional classes (e.g. from sdocbook)

Posted by Johannes Schaefer <jo...@uidesign.de>.
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

Re: svn commit: r349444 - /forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl

Posted by Johannes Schaefer <jo...@uidesign.de>.
see comments inline

Johannes Schaefer schrieb:
> Still -1?
> Johannes

this ought not to be here ...
js

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

Re: svn commit: r349444 - /forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl

Posted by Johannes Schaefer <jo...@uidesign.de>.
Still -1?
Johannes


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

Re: svn commit: r349444 - /forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl

Posted by Thorsten Scherler <th...@apache.org>.
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}">

Otherwise it is a nightmare in the *.css.

salu2

>        <xsl:copy-of select="@id"/>
>        <xsl:value-of select="."/>
>      </span>
> 
> 
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)