473,396 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to use tidy to "beautify" xhtml ?

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 an**@priv.onet.pl an**@xl.wp.pl
http://anfi.homeunix.net/ http://slashdot.org/~anfi
*Random Epigram* :
A country can be judged by the quality of its proverbs.
-- German Proverb

Jul 20 '05 #1
5 3369
Andrzej Adam Filip (Tue, 01 Jun 2004 20:34:00 +0000):

BTW Can you recommend another free tool to beautify xhtml ?


xmllint --format --html

Chris
--
Chris Huebsch www.hübsch-gemacht.de | TU Chemmnitz, Informatik, RNVS
GPG-Encrypted mail welcome! ID:7F2B4DBA | Str. d. Nationen 62, B204
Chemnitzer Linux-Tage 2005, 5.-6.März | D-09107 Chemnitz
http://www.tu-chemnitz.de/linux/tag/ | +49 371 531-1377, Fax -1803
Jul 20 '05 #2
Andrzej Adam Filip <an**@priv.onet.pl> writes:
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
..... ?>
--
Chris Green <cm*@dok.org>
Fame may be fleeting but obscurity is forever.
Jul 20 '05 #3
Chris Green wrote:
Andrzej Adam Filip <an**@priv.onet.pl> writes:

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.


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 an**@priv.onet.pl an**@xl.wp.pl
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

Jul 20 '05 #4
* 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=
"..."

?
Jul 20 '05 #5
Bjoern Hoehrmann wrote:
* 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=
"..."

?


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 an**@priv.onet.pl an**@xl.wp.pl
http://anfi.homeunix.net/ http://slashdot.org/~anfi
*Random Epigram* :
A field held in common is always ravaged by bears.
-- Russian Proverb

Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Anna | last post by:
Hi all. I have probably a rather stupid question. If there is an HTML document, XML-formed using JTidy, is there any tool to convert it to valid XHTML? I.e. so that all the tags and attribute...
10
by: mike | last post by:
regards: I use Jtidy (api) to translate a HTML file into a "XHTML file". But The "XHTML file" cannot be identified by nokia 6600. Do I miss something important? Or this is Jtidy's weakness or...
7
by: mike | last post by:
regards: Is there a HTML to XHTML gateway on the WWW? Any positive suggestion is welcome. thank you May goodness be with you all Thank you,Positive Feedback to mikeotp@gmail.com
10
by: Leo Breebaart | last post by:
Hi all, I have written an XHTML syntax checker, called 'Tidybot'. It is built on top of the well-known "HTML Tidy" library. I wrote it because I needed some very specific functionality I...
12
by: hawat.thufir | last post by:
I'm trying do some "screen scraping", and am using <http://www.oreilly.com/catalog/xmlhks/> for inspiration. First I'd like to convert XHTML to XML, or extract XML from XHTML, I'm not sure how...
12
by: Stefan Weiss | last post by:
Hi. (this is somewhat similar to yesterday's thread about empty links) I noticed that Tidy issues warnings whenever it encounters empty tags, and strips those tags if cleanup was requested....
9
by: wardy1975 | last post by:
Hi All, Looking for a little expert advice on a few web standards issues. I am currently trying to understand the impact of web standards for a web application I work with. I have been doing a...
24
by: Dan Jacobson | last post by:
I shall jump on the XHTML bandwagon. I run my perfectly good html4/strict pages thru $ tidy -asxhtml -utf8 #to get: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"...
1
by: Martin Odhelius | last post by:
Hello, Does anybody here have any example code for Tidy.Net (http://sourceforge.net/projects/tidynet/) ? I can't find one single example. I try to convert a html-string to well formed xhtml,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.