Re: [WSG] Preserve whitespace

2007-12-12 Thread Hassan Schroeder

Simon Cockayne wrote:


This is *not* a presentation/layout issue.

I have a field that contains leading blanks (space) characters that the 
user tells me has semantic meaning that they wish to preserve.


So what do you mean by preserve?

The text nodes inside tdfoo/td and td  foo/td aren't equal
in value, regardless of how they're displayed; they're strings with
lengths of 3 and 5 characters, respectively.

The space characters are certainly there, so the issue you're trying
to address isn't at all clear...

--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

  dream.  code.


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Preserve whitespace

2007-12-12 Thread Chris Knowles
Simon Cockayne wrote:
 
 This is *not* a presentation/layout issue.

from this i gather you mean it doesn't matter how it appears on screen
to the person viewing it - in other words it doesn't matter whether it
visually has any indent or not. In which case you can ignore pre, nbsp,
css as they are all to do with presentation/layout

 
 I have a field that contains leading blanks (space) characters that the
 user tells me has semantic meaning that they wish to preserve.
 

as its not a presentation issue then presumably it must be a
programmatic one whereby the HTML hasn't reached it's end use when it
gets displayed in the browser. From there I assume it will be further
accessed via the DOM or by scraping or something, where the amount of
whitespace at the beginning of the content gives meaning to it?

If all the above is correct, then I don't see why you need to do
anything other than generate the HTML with the right amount of space in
it like:

tdcontent/td

the browser will only display one of the spaces in the above but they
will still remain in the source - they won't be stripped out at any stage

or have I misunderstood your question?

-- 
Chris Knowles


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



[WSG] preserve whitespace

2007-12-11 Thread Simon Cockayne
Hi,

!-- Happy Holidays one and all! --

I have an HTML page and I want to (well my client wants me to) preserve
leading blanks in the value of a table data cell.

I could use pre /pre around the data.

Or I could use an nbsp; for each leading blank.

Any others?

What is the standard way to do it?


Cheers,

Simon


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

Re: [WSG] preserve whitespace

2007-12-11 Thread Stepan Reznikov
td {text-indent: 1em;}


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] preserve whitespace

2007-12-11 Thread Patrick H. Lauke

Quoting Simon Cockayne [EMAIL PROTECTED]:


I have an HTML page and I want to (well my client wants me to) preserve
leading blanks in the value of a table data cell.


Depending on the data...right-align the text?

--
Patrick H. Lauke
__
re·dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]
www.splintered.co.uk | www.photographia.co.uk
http://redux.deviantart.com
__
Co-lead, Web Standards Project (WaSP) Accessibility Task Force
http://webstandards.org/
__
Take it to the streets ... join the WaSP Street Team
http://streetteam.webstandards.org/
__



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] preserve whitespace

2007-12-11 Thread Константин Ефимов
The standard way is to use paddings (if your HTML page really contains table 
data) or not to use tables for layout purpose at all.

-
Konstantin Efimov
http://webstandards.org.ru


  - Original Message - 
  From: Simon Cockayne 
  To: wsg@webstandardsgroup.org 
  Sent: Tuesday, December 11, 2007 8:09 PM
  Subject: [WSG] preserve whitespace


  Hi,

  !-- Happy Holidays one and all! --
  I have an HTML page and I want to (well my client wants me to) preserve 
leading blanks in the value of a table data cell.
  I could use pre /pre around the data. 
  Or I could use an nbsp; for each leading blank.
  Any others?
  What is the standard way to do it?

  Cheers,

  Simon

***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***


Re: [WSG] preserve whitespace

2007-12-11 Thread David Hucklesby
On Tue, 11 Dec 2007 16:09:03 +, Simon Cockayne wrote:

 I have an HTML page and I want to (well my client wants me to) preserve 
 leading blanks
 in the value of a table data cell. ...


 td {white-space: pre;} /* perhaps? */


Cordially,
David
--
www.hucklesby.com




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] preserve whitespace

2007-12-11 Thread Christian Montoya
 - Original Message -
 From: Simon Cockayne
 To: wsg@webstandardsgroup.org
 Sent: Tuesday, December 11, 2007 8:09 PM
 Subject: [WSG] preserve whitespace

 Hi,

 !-- Happy Holidays one and all! --
 I have an HTML page and I want to (well my client wants me to) preserve
 leading blanks in the value of a table data cell.
 I could use pre /pre around the data.
 Or I could use an nbsp; for each leading blank.
 Any others?
 What is the standard way to do it?

I would recommend pre over nbsp;, that way the data itself would stay clean.

-- 
--
Christian Montoya
christianmontoya.net


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***