472,791 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,791 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 3335
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,...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.