hi bill

i'm not really too sure one way or the other - i'd need to examine the 
html spec and have a think about it. so it's quite possible that somebody 
will be able to jump in and give a definite answer straight away.

but what would be really useful is a patch submitted against cvs (cvs diff 
-u) so that we can all take a good look at exactly what you're proposing.

- robert

On Thursday, August 2, 2001, at 11:33 PM, Bill Hackmann wrote:

> The HTML 4.01 specification provides that the value of a keyword/value 
> pair must
> be delimited in quotes (single or double) if it contains any characters 
> other
> than (upper and lower case letters, numerals, and period, semi colon, 
> hyphen and
> underscore).
>
> I modified ElementAttributes.createStartTag as follows:
>
> 1) The special value "ECS_NO_ATTRIBUTE_VALUE" was being placed in the 
> html occasionally
> 2) The "value" was scanned and the value enclosed as follows:
> �
> 2.1) If "attribute_quote" is false, and value is valid to be unquoted, it 
> is left unquoted
> 2.2) If the "value" contains EITHER a single or a double quote, but not 
> both, and the value is to be quoted, it is enclosed in the delimiter 
> which does not appear in the string
> 2.3) If the "value" contains both a single and a double quote, a single 
> quote is used, and embedded single quotes are converted to %#39;� It 
> might be better to count and use the one which make the final string the 
> shortest.
>
> examples:
>
> <input name=thisIsAnInputField_Name ...>
> need not be quoted unless all values must be due to ecs defaults.
>
> onClick=work('securities',';insurance',"true");
> Single quoted value:
> onClick='work(&#39;securities&#39;,&#39;insurance&#39;,"true");'
> which is properly executed by both IE 5.5 and NN 4.75.
>
> This implementation may introduce an incompatibility with prior ECS code,
>  and so� maybe it should be controlled by an optional ECS Attribute, such 
> as attribute_quote_either=true
>
> This relieves the developer from needing to examine the contents of every 
> string used as a value in an attribute, and adjusting the contents to 
> match the expected value in the ecsdefaults file.
>
> Is there a reason this is a bad idea?
>
> Also, how closely does the Character.isLetter(char c) function match 
> "letters" as defined in the 4.01 HTML spec?� I implemented using the 
> Latin alphabet, but isLetter() uses a definition which is much more broad.
>
> Comments, please.
>
> Hackmann
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to