How to use tidy to "beautify" xhtml ?

  • Thread starter Andrzej Adam Filip
  • Start date
A

Andrzej Adam Filip

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/

--
Andrzej [en:Andrew] Adam Filip (e-mail address removed) (e-mail address removed)
http://anfi.homeunix.net/ http://slashdot.org/~anfi
*Random Epigram* :
A country can be judged by the quality of its proverbs.
-- German Proverb
 
C

Chris Green

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
..... ?>
 
A

Andrzej Adam Filip

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
.... ?>

--
Andrzej [en:Andrew] Adam Filip (e-mail address removed) (e-mail address removed)
http://anfi.homeunix.net/ http://slashdot.org/~anfi
*Random Epigram* :
"Infidels in all ages have battled for the rights of man, and have at all times
been the fearless advocates of liberty and justice."
-- Robert Green Ingersoll
 
B

Bjoern Hoehrmann

* 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=
"..."

?
 
A

Andrzej Adam Filip

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" :-(

--
Andrzej [en:Andrew] Adam Filip (e-mail address removed) (e-mail address removed)
http://anfi.homeunix.net/ http://slashdot.org/~anfi
*Random Epigram* :
A field held in common is always ravaged by bears.
-- Russian Proverb
 

Members online

No members online now.

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top