V
verdy_p
The "HTML Reformat" option in FrontPage 2003, even if it is much better than
in previous versions, still suffers from bugs.
One of the most common is that it changes the page layout for sections of
code texts formated with <pre>, when it contains fragments with coloring tags
or anchors.
One example:
<pre>String result = MessageFormat.format(
"At {1,time} on {1,date}, there was {2} on planet {0,number,integer}.",
<font color="#009900">7</font>, //
{0,number,integer}
new Date(), // {1,date/time}
"a disturbance in the Force" // {2,string}
);
</pre>
When reformated, it becomes:
<pre>String result = MessageFormat.format(
"At {1,time} on {1,date}, there was {2} on planet {0,number,integer}.",
<font color="#009900">7</font>, //
{0,number,integer}
new Date(), // {1,date/time}
"a disturbance in the Force" // {2,string}
);
</pre>
where *significant* whitespaces around the <font> and </font> tags are
dropped.
The "HTML Reformat" option is also not correct with anchors, as it allows
inserting a line break (i.e. a whitespace) after the initial <a href="...">
tag (on many browsers, this will produce a line-break opportunity and will
often underline this whitespace); This changes the layout because anchors are
inline elements, where inner whitespaces can be normalized but cannot (should
not) be ignored according to the HTML specifications.
On the opposite, it leaves an unnecessary whitespace before closing tags
</td> or </p> or </li>... of block elements. These also apply with the
"Optimize HTML".
-- Philippe.
in previous versions, still suffers from bugs.
One of the most common is that it changes the page layout for sections of
code texts formated with <pre>, when it contains fragments with coloring tags
or anchors.
One example:
<pre>String result = MessageFormat.format(
"At {1,time} on {1,date}, there was {2} on planet {0,number,integer}.",
<font color="#009900">7</font>, //
{0,number,integer}
new Date(), // {1,date/time}
"a disturbance in the Force" // {2,string}
);
</pre>
When reformated, it becomes:
<pre>String result = MessageFormat.format(
"At {1,time} on {1,date}, there was {2} on planet {0,number,integer}.",
<font color="#009900">7</font>, //
{0,number,integer}
new Date(), // {1,date/time}
"a disturbance in the Force" // {2,string}
);
</pre>
where *significant* whitespaces around the <font> and </font> tags are
dropped.
The "HTML Reformat" option is also not correct with anchors, as it allows
inserting a line break (i.e. a whitespace) after the initial <a href="...">
tag (on many browsers, this will produce a line-break opportunity and will
often underline this whitespace); This changes the layout because anchors are
inline elements, where inner whitespaces can be normalized but cannot (should
not) be ignored according to the HTML specifications.
On the opposite, it leaves an unnecessary whitespace before closing tags
</td> or </p> or </li>... of block elements. These also apply with the
"Optimize HTML".
-- Philippe.