Bob, from what you're describing, I'd recommend writing your own file
parsing routine to fix these files. It's not a difficult algorithm.

Open input file
Open new output file
Parse each char from input file, looking for "<"
When "<" found, examine next char, to determine it is either "/" or
an alpha. If so, call a user function. I'll use lcTags() for my example.

function lcTags() {
lowercase each char until ">" or "=" is found
if "=" check next char for single or double quote
if quoted, leave case as is until matching closing quote
if ">" return
}

I'm sure you get the idea. Be sure to parse by character rather than by
line.

hth,
Mike


On 7/31/2005, "Bob" <[EMAIL PROTECTED]> wrote:

>Hi Wade,
>The reason I can't use Tidy is that the pages may start with opening table 
>tags.
>The closing table tags are in other pages.
>Some tags stretch across 4 pages, so matching closing tags are scattered 
>around.
>
>Tidy wants to put these tags right, which would stop the site working.
>
>I could assemble the whole page and put it though Tidy (then cut it up back 
>into the original include files), but I can't stop Tidy removing the hundreds 
>of multiple spaces and blank lines.
>
>I tried that, and put back some of the spaces and blank lines, but they 
>noticed it wasn't exactly the same.
>Why these spaces must remain is a mystery, as the browser ignores them.
>I can see the blank lines help, but 4 to 8?
>
>
>----- Original Message -----
>From: "Wade Smart" <[EMAIL PROTECTED]>
>To: <[email protected]>
>Sent: Sunday, July 31, 2005 5:21 PM
>Subject: Re: [php-list] Lowercase problem
>
>
>> 07312005 1114 GMT-5
>>
>> Hey Bob, some clients just arent worth having. I had this client once
>> similar to your current one. "Do this and that but dont touch anything
>> at all!" was pretty much what they said. "We want speed. Make it load
>> faster. Make search engines see our pages. Fix these errors on our
>> pages. But DONT TOUCH ANYTHING. CHANGE NOTHING!" What crazy nut jobs.
>>
>> You said Tidy would not not put in closing tags. Well, if they need
>> them, then they must have them to be valid. Right?
>>
>> Just out of curiosity, if you have a server to test on, what happens
>> when you remove all that blank space, all those spaces? Probably
>> nothing, unless they have to do with the tables. Remove all that stuff,
>> make it nice a neat. If they say something to you about it, politely
>> ask, "...and you knowledge of my job is what?"
>>
>> Wade
>
>
>
>
>Community email addresses:
>  Post message: [email protected]
>  Subscribe:    [EMAIL PROTECTED]
>  Unsubscribe:  [EMAIL PROTECTED]
>  List owner:   [EMAIL PROTECTED]
>
>Shortcut URL to this page:
>  http://groups.yahoo.com/group/php-list
>Yahoo! Groups Links
>
>
>
>
>
>
>


------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12huc3p01/M=362335.6886445.7839731.1510227/D=groups/S=1705005703:TM/Y=YAHOO/EXP=1122840808/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/";>In
 low income neighborhoods, 84% do not own computers. At Network for Good, help 
bridge the Digital Divide!</a>.</font>
--------------------------------------------------------------------~-> 

Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to