473,491 Members | 3,350 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

HTML tags optimization

hi all,

i want to do some optimizations for HTML tags,

something like this:

<i><b>TEXT1</b></i><b><i><u>TEXT2</u></i></b>

optimise to

<i><b>TEXT1<u>TEXT2</u></b><i>

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

<font color=red><font size=6>TEXT1</font></font>

optimise to

<font color=red size=6>TEXT1</font>

but if there is TEXT2 exist

<font color=red><font size=6>TEXT1</font>TEXT2</font>

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
<font size=5><font size=7>TEXT</font></font>
=>
<font size=7>TEXT</font>

2
<i>TEXT </i><i>TEXT</i>
=>
<i>TEXT TEXT</i>

3
<i>TEXT<i>TEXT</i></i>
=>
<i>TEXT</i>

etc...

Sep 2 '05 #1
2 1051
DENG wrote:
hi all,

i want to do some optimizations for HTML tags,

something like this:

<i><b>TEXT1</b></i><b><i><u>TEXT2</u></i></b>

optimise to

<i><b>TEXT1<u>TEXT2</u></b><i>

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.

[etc ...]

Are you expecting the answers to be different that they were two days ago?

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

Sep 2 '05 #2
DENG wrote:
(snip same post as two days ago)

<ot>
In case you don't know, google.groups is just a web interface (and
archive) to usenet groups. No need to repost the same question twice...
</ot>

BTW, for what you want to do (which is mostly a waste of time IMHO, but
what, that's your time, not mine), the obvious, CS101 answer is to first
build an AST of your document, then transform this AST - collapsing
nodes when possible etc -, then write it back as (if possible valid) html.
--
bruno desthuilliers
ruby -e "print 'o****@xiludom.gro'.split('@').collect{|p|
p.split('.').collect{|w| w.reverse}.join('.')}.join('@')"
Sep 2 '05 #3

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

Similar topics

5
3744
by: Donald Firesmith | last post by:
Are html tags allowed within meta tags? Specifically, if I have html tags within a <definition> tag within XML, can I use the definition as the content within the <meta content="description> tag? ...
6
1194
by: DENG | last post by:
hi all, i use SGMLParser to process HTML files, in order to do some optimizations, something like this: <i><b>TEXT1</b></i><b><i><u>TEXT2</u></i></b> optimise to
32
2883
by: Cornel Bicutzi | last post by:
Hello, What is the difference between HTML and XHTML... Thanks, ------------------------------------------------------------------------ IT Interview Questions :...
2
1484
by: Brian Henry | last post by:
Is there anyway to force the output HTML from asp.net to be optimized? for example tabs removed, white space between tags remove, comments removed, etc (to reduce output page size) frontpage 2003...
5
2320
by: acord | last post by:
Hi, I m getting annoying display problem when placing javascript tags in a html page. Should the javasscript tags placed at the beginning of a html page before anything start? or placed between...
9
6697
by: anupamjain | last post by:
Hi, After 2 weeks of search/hit-and-trial I finally thought to revert to the group to find solution to my problem.(something I should have done much earlier) This is the deal : On a JSP...
2
1260
by: Mantorok | last post by:
Is it advisable to use metatags in html pages? I'm going to be creating som ehtml pages on the fly from my website and then ultimately publish them, however I want these pages to be picked up by...
1
1592
by: Max Power | last post by:
HTML reprocessor: how do you get rid of the obese MS-Word (normal or filtered) HTML? I just want all the fancy MS tags removed and replaced with basic ones, or if applicable -- stripped entirely...
1
16925
by: since | last post by:
I figured I would post my solution to the following. Resizable column tables. Search and replace values in a table. (IE only) Scrollable tables. Sortable tables. It is based on a lot...
0
7118
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
7157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7192
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
7364
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...
1
4886
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4579
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1397
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.