RE: [WSG] specifying width of pre

2005-10-24 Thread patboens
Hi,

The easiest way to define this is to create a division whose overflow attribute 
is set to auto. example:

div style=overflow:auto;width=500px;
  pre
 whatever code you want
  /pre
/div


Hope it helps.


Pat Boens
http://www.fastwrite.com


-Original Message-
Is there any way to specify a max width for content of pre tags? Currently
the content of my pre tags does not automatically wrap when the parent div
is at an end - it just keeps on running until it finds the end of the line.
I know the idea of the pre tag is to display the content as it is, but of
course I want it to remain in the boundaries of my parent element.

Any ideas? 

**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



RE: Re: [WSG] When bugs become patterns - A look at CSS Hacks

2005-10-05 Thread patboens
I am also a bit late in the process of giving my humble advice on this thread.

Being a C programmer for almost 20 years, I would like to cover my developer's 
hat for a few minutes. I strongly discourage using comments to obtain ... 
conditional compilation/interpretation.

In many languages, such as C, conditional compilation is achieved via the C 
pre-processor, a sort of pre-compilation step. In interpreted languages, the 
statements are conditionally interpreted via specific directives.

Pre-processing directives, or any derivative, is the proper way to achieve 
conditional interpretation.

I have taken the decision to step away from this weird possibility of IE ... 
simply because I do not want to be obliged, in a year or two, to change a bulk 
of web sites built on that feature.

... voilĂ  ... this is my humble contribution.

Pat



-Original Message-
Hi

This is a bit late, the internet broke for me for the last few days...

On 9/30/05, Thierry Koblentz [EMAIL PROTECTED] wrote:

 James Ellis wrote:
  Conditional statements in HTML such as those used by IE/Windows are a
  slippery slope and they seriously break a central tenet of
  programming. They are contained with !-- HTML comments -- and
  comments in code are not meant to be parsed as code. It's just plain
  badness.

 I don't follow you here. These comments *are meant to be* parsed by
 IE/Win.


Wrong.. comments are not meant to be parsed by an interpreter. Comments are
descriptive rather than interpretive.

Taking one step back here from the browser level here to get closer to the
programming layer would be good. The result of the use of code in comments
is being focused on here rather than how the result was made. In
programming, if we reach a result that appears to work based on poor coding,
we don't have a solution to the problem - we have a workaround based on
exploitable hacks. Mistakes building on mistakes.

Forget that it's IE for a second and look at what is happening in the
programming layer. There is an interpreter that is parsing the code, when it
comes upon a comment section it blithely ignores the fact the programmer has
escaped out of the interpreted part of the script and into the descriptive
part of the script. Oh, you didn't want me to parse that but I'll do it
anyway -- just to be sure... where could this end up? I don't know but I
sure don't like the idea of any interpreter parsing comments, with
unexpected results.

I agree with you both that it works in this situation, but it's based on
flawed programming principles and in doing this we've exposed the fact that
the IE interpreter parses what's in the comment, something that's not for
the interpreter to consume. Place something benign in the comment that is
then interpreted as an action to be carried out - bang! the interpreter
falls over or worse. It's a seriously flawed method of developing
applications.

Link : http://en.wikipedia.org/wiki/Comments
Link : http://webdesign.about.com/od/beginningtutorials/a/aa050503a.htm

 What happens if someone adds a comment that happens to be
  parsed by some piece of software? the software then goes on and does
  some unexpected things.

 Anything inside coments is supposed to be ignored by UAs so if something
 goes wrong it would be because of the browser and not because of what's
 inside these comments.


Haven't you just said above that the special conditional comments are meant
to be parsed by IE/Win? I don't follow.

 Comments, of course, can be machine readable such as those used to
  provide code documentation or CVS/SVN keywords, but these don't
  actually run anything or fork the code base.
 
  This is a 2005 version of mid 90's browser sniffing - forking the
  codebase to provide slighlty different content based on the client in
  use. Better to get the browsers actually rendering things to the
  published spec (hard, yes, but a better outcome).

 IMHO, this is a nice idea, but not very realistic.


Well, if we decide not to push the doors won't open.

James 

**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



RE: [WSG] bi-lingual page?

2005-08-10 Thread patboens
Hi,

This is stuff we're pretty much used to deal with on a daily basis, here in 
Belgium. We have 3 national languages : Dutch, German, and French.

Not only do we do this on websites but also in regular software in which 
dynamic switching between languages should be possible, or printing in French 
while the interface is displayed in Dutch.

Here you were talking about displaying the content simultaneously in Englisg 
and German. This is definitely easier to manage than dynamic language switching.

The way I used to deal with this issue was to store all my content in a 
database and extract the text from one field or another (msg_fr, msg_de, or 
msg_en) based on the current language of the user. You can also achieve the 
same thing via external text files that you include in your main page (for 
example you have a page called mypage.php ... and this would include the 
content of mypage.php.de.txt if German is what you need or mypage.php.en.txt if 
English is required.

The language of the user is usually stored in a cookie and you should apply a 
default language to a page.

When you display the information, please mark your paragraphs with the 
appropriate lang attribute: either p xml:lang=de.../p (XHTML 1.1) or p 
lang=de (HTML 1.0). Please notice that your main page should be marked with 
a language attribute too :

html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en (XHTML 1.1)

or

html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en (XHTML 1.0)

Mark the paragraphs with their language attribute only if they differ from the 
default language of the page.

You can easily decide to hide text in a certain language via CSS: *[lang=en] 
{ display:none }. But this will NOT work with IE unfortunately.

By using the lang attribute on your paragraphs, you will ease the pain of the 
search engines.

If you want to implement dynamic language switching, you will have to implement 
a mechanism such as a link to a page that will update the cookie of the user: 
changelang.php?lang=en or changelang.php?lang=de. What thsi page does is very 
simple : it updates the cookie of the user and then gets back to the HTTP 
referrer (the page we're coming from so that it gets redisplayed). However, 
this can create some accessibility problems because it breaks the back 
sequence. Also, there may be some issues to solve with caching.


Hope this helps

Pat


-Original Message-
hi all

this is the first time I've done anything like this but I'm wondering what it 
takes to display two languages (and therefore two charsets) on the same page? - 
English and German

the content will be a side-by-side translation of each language

thanx
barry.b

PS: no doubt I'll have more questions later but I'm starting from the display 
and working backwards  to the content storage (ensuring the database can 
support unicode, etc) and then the content capture (a form in either English 
and German)
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
** 

**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



[WSG] Align text vertically in a division

2005-08-09 Thread patboens
Hello All,

I am sure that you have described this issue thousand times before, but I 
cannot find the trick that will do this easily : how do you center text 
vertically in a division ?

Easy to do with tables of course, but I would like to avoid using tables at all.

euh ... as we say in French ... sorry if the question seems stupid.


Pat 

**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



RE: [WSG] Semantic Web

2005-03-04 Thread patboens
Piero,

I am definitely interested in this topic though I have not a big experience in 
that domain.

Semantic Web will be one of my priorities in the future. So I am ready to 
participate to any initiative in that area.

Pat

-Original Message-
Is there anyone interested in semantic web? I'd like to try to spread this
topic in the forum I use to attend (http://forum.html.it), but I see that
it doesn't interest a lot.

I think that the principles of semantic web can help us understand much
better the importance of clean and logical coding.

So, can anyone help me understand how to spread the message in a simple
and interesting way?

Thanks,
Piero.

**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
** 

**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**