W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2005

protection of white space

From: Rich Morin <rdm@cfcl.com>
Date: Mon, 17 Oct 2005 09:38:16 -0700
Message-Id: <p0623090bbf798251019e@[192.168.254.205]>
To: html-tidy@w3.org

I'm trying to use Tidy on the *.graffle files that the OmniGraffle
program (http://www.omnigroup.com/applications/omnigraffle) produces.
Unfortunately, Tidy is a bit too zealous about boiling down assorted
white space.  For example, it turns this:

 
<string>{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf110
{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;}
{\colortbl;\red255\green255\blue255;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural

\f0\fs24 \cf0 Editable Document:\
\
Diagram!,
\f1\b OmniGraffle
\f0\b0 ,
\f1\b OmniOutliner
\f0\b0 ,
\f1\b Visio XML}</string>


into this:

<string>
{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf110
{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77
Helvetica-Bold;} {\colortbl;\red255\green255\blue255;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
\f0\fs24 \cf0 Editable Document:\ \ Diagram!, \f1\b OmniGraffle
\f0\b0 , \f1\b OmniOutliner \f0\b0 , \f1\b Visio XML}</string>


I tried changing the <string> tags to say <string xml:space="preserve">,
but this didn't help.  Is there a way to preserve white space in strings?

-r
-- 
email: rdm@cfcl.com; phone: +1 650-873-7841
http://www.cfcl.com        - Canta Forda Computer Laboratory
http://www.cfcl.com/Meta   - The FreeBSD Browser, Meta Project, etc.
Received on Tuesday, 18 October 2005 01:44:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:55 GMT