How to use tidy to "beautify" xhtml ?

Andrzej Adam Filip

Usenet Archive
Joined
Mar 3, 2004
Messages
44
Reaction score
0
Could you post some recommendation/advices which options should be used when using tidy to beautify xhtml ?

It seems that "wrapped" xhtml produced by standards settings is not "liked" by some search engines .

e.g. tidy inserted line breaks in attributes after opening "

.....<a href="
http://example.com/"> ...

[google parsed it with no problems]

BTW Can you recommend another free tool to beautify xhtml ?

URL(s):
http://tidy.sourceforge.net/
 

Chris Green

Usenet Archive
Joined
Nov 19, 2001
Messages
27
Reaction score
0
Andrzej Adam Filip said:
It seems that "wrapped" xhtml produced by standards settings is not "liked" by some search engines .

e.g. tidy inserted line breaks in attributes after opening "

....<a href="
http://example.com/"> ...

I have a ~/tidy.conf with the contents:

wrap: 0

and run tidy with:

tidy -i -m -config ~/tidy.conf file.xhtml. I don't like the wrapping just because it makes nesting difficult.

My biggest problem with tidy is that I use www.clearsilver.net for a templating system and it doesn't support that kind of tag markup <?cs ..... ?>
 

Andrzej Adam Filip

Usenet Archive
Joined
Mar 3, 2004
Messages
44
Reaction score
0
Chris said:
I have a ~/tidy.conf with the contents:

wrap: 0

and run tidy with:

tidy -i -m -config ~/tidy.conf file.xhtml. I don't like the wrapping just because it makes nesting difficult.

I want to get wrapping :-(
I use wider than default "wrap space" (--wrap 120).

It seems that "--indent-attributes yes" fixed the problem.
My biggest problem with tidy is that I use www.clearsilver.net for a templating system and it doesn't support that kind of tag markup <?cs .... ?>
 

Bjoern Hoehrmann

Usenet Archive
Joined
Aug 15, 2000
Messages
719
Reaction score
0
* Andrzej Adam Filip wrote in comp.text.xml:
Could you post some recommendation/advices which options should be used when using tidy to beautify xhtml ?

It seems that "wrapped" xhtml produced by standards settings is not "liked" by some search engines .

e.g. tidy inserted line breaks in attributes after opening "

....<a href="
http://example.com/"> ...

Are you certain it's not actually before the " as in

<a href=
"..."

?
 

Andrzej Adam Filip

Usenet Archive
Joined
Mar 3, 2004
Messages
44
Reaction score
0
Bjoern said:
* Andrzej Adam Filip wrote in comp.text.xml:

Are you certain it's not actually before the " as in

<a href=
"..."

?

You are right.

I was mislead by "Page Source" of Mozilla 1.6. The actual file was formatted as you wrote. I have found it when trying to post "wrong format" extract from the actual file.

I have accused tidy of another program "sins" :-(
 

Members online

No members online now.

Forum statistics

Threads
548,208
Messages
3,104,802
Members
249,594
Latest member
henrywalsh

Latest Threads

Top