You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by Joshua Slive <jo...@slive.ca> on 2002/10/03 03:31:05 UTC

Re: cvs commit: httpd-2.0/docs/manual/style common.dtd

On 3 Oct 2002 nd@apache.org wrote:

> nd          2002/10/02 17:53:48
>
>   Modified:    docs/manual/mod core.html.en core.xml quickreference.html.en
>                docs/manual/style common.dtd
>   Log:
>   ok, starting this: turn bogus <em> to <var>
>   also:
>   - several markup improvements (I hope)
>   - remove &nbsp; from c&p examples, because:
>     - if you want preformatted text, use <pre>
>     - they may lead to invisible errors (\xA0 = &nbsp;
>       is not recognized by the config parser as whitespace)
>    

I'm not a big fan of this last part.  <pre> does not really fit in well
with xml.  It has no symantics and it violates the separation of content
and presentation.  In addition, it can really mess up the presentation of
content when space is constrained in the browser.  In some setups, in can
cause entire pages to be unreadable.

One alternative solution is to invent an <indent> tag for those things to
replace the &nbsp;.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: cvs commit: httpd-2.0/docs/manual/style common.dtd

Posted by André Malo <nd...@perlig.de>.
* Joshua Slive wrote:

> See, for example,
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html
> 
> It happens pretty-much whenever a <pre> is included in a <table> or
> other fixed-width block.  We don't do that frequently in the httpd
> docs at the moment (due to the fancy css), but who knows in the
> future. 

I wouldn't say unreadable (= unusable for me), but ok...

>>>One alternative solution is to invent an <indent> tag for those
>>>things to replace the &nbsp;.

after some reflecting and heavy discussion (thanks kess ;), I think we
should really stick with your idea: 

the usage would be, for example:

<example>
  &lt;VirtualHost foo&gt;
  <indent>
    ServerName bar<br />
    DocumentRoot /path<br />
    <br />
    &lt;Files "mypaths.shtml"&gt;<br />
    <indent>
      Options +Includes<br />
      SetOutputFilter INCLUDES<br />
      AcceptPathInfo on<br />
    </indent>
    &lt;/Files&gt;<br />
    <br />
    ErrorLog another/path<br />
    # ...<br />
  </indent>
  &lt;/VirtualHost&gt;
</example>

and result in:

<div class="example"><p><code>
  &lt;VirtualHost foo&gt;
  <span class="indent">
    ServerName bar<br />
    DocumentRoot /path<br />
    <br />
    &lt;Files "mypaths.shtml"&gt;<br />
    <span class="indent">
      Options +Includes<br />
      SetOutputFilter INCLUDES<br />
      AcceptPathInfo on<br />
    </span>
    &lt;/Files&gt;<br />
    <br />
    ErrorLog another/path<br />
    # ...<br />
  </span>
  &lt;/VirtualHost&gt;
</code></p></div>

with a CSS of:

  span.indent {padding-left: 1em; display: block;}

additionally we may consider to use a CSS similiar to the "<pre> effect"

  div.example > p > code {white-space: nowrap;}

which doesn't preserves the whitespace, but only the linebreaks.
I'm at the moment really unsure about ;-)

Two side notes:
  - MSIE doesn't wrap at whitespace with the latter CSS, but at other 
    chars, e.g. "-".
  - multiple <br />s are not necessarily displayed as multiple line 
    breaks.

nd
-- 
If God intended people to be naked, they would be born that way.
  -- Oscar Wilde

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: cvs commit: httpd-2.0/docs/manual/style common.dtd

Posted by Joshua Slive <jo...@slive.ca>.
André Malo wrote:

> 
>>In addition, it can really mess up the presentation of
>>content when space is constrained in the browser.  In some setups, in
>>can cause entire pages to be unreadable.
> 
> 
> huh? Do you have an example for such a case?

See, for example,
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html

It happens pretty-much whenever a <pre> is included in a <table> or 
other fixed-width block.  We don't do that frequently in the httpd docs 
at the moment (due to the fancy css), but who knows in the future.

> 
> 
>>One alternative solution is to invent an <indent> tag for those things
>>to replace the &nbsp;.
> 
> 
> which does violate the separation the same way ;-)

I wouldn't say in the same way.  I would say in a much more specific way.

> 
> hmm. If <pre> (or the CSS pendant) is not used the browser may break the
> lines anywhere a whitespace occurs. This may confuse people. And I
> think, code example *are* preformatted text ("semantically") - one
> config line cannot be wrapped anywhere a WS occurs without preparation
> (\). I know, it's not a real semantic thing, but... 

This is true.  I can't say I have a perfect answer.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: cvs commit: httpd-2.0/docs/manual/style common.dtd

Posted by André Malo <nd...@perlig.de>.
* Joshua Slive wrote:

> On 3 Oct 2002 nd@apache.org wrote:
>>   - remove &nbsp; from c&p examples, because:
>>     - if you want preformatted text, use <pre>
>>     - they may lead to invisible errors (\xA0 = &nbsp;
>>       is not recognized by the config parser as whitespace)

> I'm not a big fan of this last part.  <pre> does not really fit in
> well with xml.  It has no symantics and it violates the separation of
> content and presentation. 

yes, a bit...

> In addition, it can really mess up the presentation of
> content when space is constrained in the browser.  In some setups, in
> can cause entire pages to be unreadable.

huh? Do you have an example for such a case?

> One alternative solution is to invent an <indent> tag for those things
> to replace the &nbsp;.

which does violate the separation the same way ;-)

you mean:
<example>
&lt;Directory foo&gt;<br />
<indent>
something<br />
something else<br />
</indent>
&lt;/Directory&gt;
</example>

?
What would be the desired html/css result?
something like:

&lt;Directory foo&gt;<br />
<span class="indent">
something<br />
something else<br />
</span>
&lt;/Directory&gt;

?

hmm. If <pre> (or the CSS pendant) is not used the browser may break the
lines anywhere a whitespace occurs. This may confuse people. And I
think, code example *are* preformatted text ("semantically") - one
config line cannot be wrapped anywhere a WS occurs without preparation
(\). I know, it's not a real semantic thing, but... 

nd
-- 
s  s^saaaaaoaaaoaaaaooooaaoaaaomaaaa  a  alataa  aaoat  a  a
a maoaa a laoata  a  oia a o  a m a  o  alaoooat aaool aaoaa
matooololaaatoto  aaa o a  o ms;s;\s;s;g;y;s;:;s;y#mailto: #
 \51/\134\137| http://www.perlig.de #;print;# > nd@perlig.de

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org