Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.
Moderator: General Moderators
Benjamin
Site Administrator
Posts: 6935 Joined: Sun May 19, 2002 10:24 pm
Post
by Benjamin » Fri Aug 25, 2006 10:47 pm
Ok, I downloaded the HTML version of the PHP manual to do some research. Why does it look like this? There are absolutely no spaces between tags. Spaces within tags seem to be converted to line breaks.
Code: Select all
>18. <A
HREF="language.oop.html"
>Classes and Objects (PHP 4)</A
></DT
><DT
>19. <A
HREF="language.oop5.html"
>Classes and Objects (PHP 5)</A
></DT
><DT
>20. <A
HREF="language.exceptions.html"
>Exceptions</A
></DT
><DT
>21. <A
HREF="language.references.html"
>References Explained</A
></DT
></DL
></DD
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Fri Aug 25, 2006 10:53 pm
I have no idea. I wish there was a way to clean it easily. But that markup is utterly horrible.
nickvd
DevNet Resident
Posts: 1027 Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:
Post
by nickvd » Sat Aug 26, 2006 1:36 am
Everah wrote: I have no idea. I wish there was a way to clean it easily. But that markup is utterly horrible.
Tidy Extension to the rescue!
daedalus__
DevNet Resident
Posts: 1925 Joined: Thu Feb 09, 2006 4:52 pm
Post
by daedalus__ » Sat Aug 26, 2006 4:53 pm
They don't use whitespace in between tags because sometimes it renders or something like that.
Benjamin
Site Administrator
Posts: 6935 Joined: Sun May 19, 2002 10:24 pm
Post
by Benjamin » Sat Aug 26, 2006 5:03 pm
Where did you hear that?
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098 Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia
Post
by Chris Corbyn » Sat Aug 26, 2006 6:24 pm
They do use whitespace.... newlines are considered whitespace.
I really have no idea why they keep breaking line though. I guess it's the way it's generated. I've parsed the PHP manual many times before to collect all function names/synopsis and the structure is a little confusing to follow.
The only time I often break lines between tags is when I'm using inle style, or when the tag has a lot of attributes:
Code: Select all
<div style="
font-size: 2.0em;
color: red;
font-weight: bold;
font-family: verdana,tahmo,sans-serif;
letter-sapcing: 1.4em;">
Foobar
</div>
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Sat Aug 26, 2006 7:37 pm
nickvd wrote: Everah wrote: I have no idea. I wish there was a way to clean it easily. But that markup is utterly horrible.
Tidy Extension to the rescue!
That is all well and good for one page. But there are over 5,900 pages in the manual. How are we supposed to clean all of them using an extension?
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098 Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia
Post
by Chris Corbyn » Sat Aug 26, 2006 7:41 pm
Everah wrote: nickvd wrote: Everah wrote: I have no idea. I wish there was a way to clean it easily. But that markup is utterly horrible.
Tidy Extension to the rescue!
That is all well and good for one page. But there are over 5,900 pages in the manual. How are we supposed to clean all of them using an extension?
Piece of cake Mr. Everah!
I'm sure you could think of a way using PHP to scan all those files, tidy them and output them to another directory
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098 Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia
Post
by Chris Corbyn » Sat Aug 26, 2006 7:45 pm
astions wrote: Where did you hear that?
IE renders whitespace (newlines) between tags. It sucks. Try it, make a table like this one (use an image since it's fixed in dimension):
Code: Select all
<table cellpadding=0 cellspacing=0>
<tr>
<td>
<img src="some_visible_image" alt="" />
</td>
</tr>
</tr>
View it in IE then try this one:
Code: Select all
<table cellpadding=0 cellspacing=0>
<tr>
<td><img src="some_visible_image" alt="" /></td>
</tr>
</tr>
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Sat Aug 26, 2006 7:48 pm
d11wtq wrote: Everah wrote:
That is all well and good for one page. But there are over 5,900 pages in the manual. How are we supposed to clean all of them using an extension?
Piece of cake Mr. Everah!
I'm sure you could think of a way using PHP to scan all those files, tidy them and output them to another directory
I could, but I'd be willing to bet someone else has already done that. I bet if I am slow to act on this that someone will come back with a link to their code that does it (or better yet, an already tidied version of it)
.
Weirdan
Moderator
Posts: 5978 Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine
Post
by Weirdan » Sat Aug 26, 2006 9:08 pm
I bet if I am slow to act on this that someone will come back with a link to their code that does it (or better yet, an already tidied version of it)
hmm... something along the lines of
Code: Select all
find ./ -name *.html -execdir tidy -o {} {}\;
might just work
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098 Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia
Post
by Chris Corbyn » Sun Aug 27, 2006 6:53 am
Weirdan wrote: I bet if I am slow to act on this that someone will come back with a link to their code that does it (or better yet, an already tidied version of it)
hmm... something along the lines of
Code: Select all
find ./ -name *.html -execdir tidy -o {} {}\;
might just work
Hehe... or that
daedalus__
DevNet Resident
Posts: 1925 Joined: Thu Feb 09, 2006 4:52 pm
Post
by daedalus__ » Sun Aug 27, 2006 3:18 pm
so i was right then?!?!
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sun Aug 27, 2006 3:20 pm
Daedalus- wrote: so i was right then?!?!
Right in thinking, but you missing a word in your post to convey just that.
daedalus__
DevNet Resident
Posts: 1925 Joined: Thu Feb 09, 2006 4:52 pm
Post
by daedalus__ » Sun Aug 27, 2006 3:32 pm
Uh... What?
I just got home from a long night
The guy who makes the skidoo layouts uses the no whitespace thing in a few different places of his layouts to keep them from breaking in IE.