W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2000

Re: 30apr00 bugs: spaces in attributs, empty ALT attributes

From: Mike Depot <mike@openair.com>
Date: Wed, 3 May 2000 17:38:31 -0400
Message-ID: <010c01bfb548$009c0180$0a00a8c0@datatrader.com>
To: "Pete Gelbman" <pete@arraycomm.com>, "Sebastian Lange" <lange@cyperfection.de>
Cc: <micke@four04.com>, <html-tidy@w3.org>
Reading from and writing to another process at the same time in Perl is a
real pain due to problems with buffering.  You can easily get into a
deadlock situation.  Your best bet with tidy is to probably use a temp file.
But having said that, if you're still really against it, look into the
IPC::Open2 and IPC::Open3 modules.  There's a good example of these in the
Perl Cookbook, recipes 16.8 and 16.9.

>  Sebastian> The basic task is following:  I have HTML content (just some
text
> Sebastian> with HTML tags, not a complete document) in a string variable
and
> Sebastian> want to pass this to Tidy via STDIN (no use of temporary
files),
> Sebastian> and then read Tidy's output (the tidied HTML content) into
another
> Sebastian> variable.  All my attempts with perls open() function did not
work
> Sebastian> out so far.
Received on Wednesday, 3 May 2000 17:43:20 GMT

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