Re: HTML tags optimization [ interesting problem]

2005-09-02 Thread DENG
hi, Sybren,

thanks for your reply, if use CSS:

texttexttext

optimise to:

texttexttext

what i need is the METHOD to do optimization, in fact, i have ready
write a program to analyse the syntax of CSS, to make it works with all
situation

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: HTML tags optimization [ interesting problem]

2005-09-01 Thread Sybren Stuvel
DENG enlightened us with:
> i use SGMLParser to process HTML files, in order to do some
> optimizations,
>
> something like this:
>
>TEXT1TEXT2
>
> optimise to
>
>TEXT1TEXT2

Why not optimize it to:

TEXT1
TEXT2?

> [ snipped stuff about  tags ]

If you're serious about using HTML, I suggest you read a book that's
not ten years old.

> anyone can give me some advices?

Yes, read the following:

http://www.w3.org/QA/Tips/
http://www.w3.org/TR/CSS21/
http://www.w3.org/TR/xhtml1/
http://validator.w3.org/

Sybren
-- 
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 
 Frank Zappa
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: HTML tags optimization [ interesting problem]

2005-09-01 Thread DENG
I know very well Tidy, sir

Tidy do a nice job but it is writen in Java, and have Python ported

my aim is to learn Python, learn how to program

I know many people write "hello the world" in 2005, why I can not write
this program in 2005?

you are french, right? peut etre we can talk about it in ecole
polytechnique? i'll be there waiting for you

thanks

-- 
http://mail.python.org/mailman/listinfo/python-list


HTML tags optimization [ interesting problem]

2005-08-31 Thread DENG

hi all,

i use SGMLParser to process HTML files, in order to do some
optimizations,

something like this:

TEXT1TEXT2

optimise to

TEXT1TEXT2


at the very beginning, i was thinking of analysing each text-block, to
know their color, size, if is bold or italic, but i found it was too
complicated.

e.g

TEXT1

optimise to

TEXT1


but if there is TEXT2 exist

TEXT1TEXT2

we can not do any optimization.

my problem is I can not find a method to treat all those situation, I
had too much thinking and get fool now


anyone can give me some advices?

thanks




PS:

other examples:

1
TEXT
=>
TEXT

2
TEXT TEXT
=>
TEXT TEXT

3
TEXTTEXT
=>
TEXT

etc...

-- 
http://mail.python.org/mailman/listinfo/python-list