[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feedback on 0.3 Format




Graham wrote:

On 19 Dec 2003, at 3:45 pm, Sam Ruby wrote:


<title mode="xml" type="text/plain">I &lt;3 NY</title>

<title mode="escaped" type="text/plain">I &amp;lt;3 NY</title>

Erm, no Sam. The second represents the text "I &lt;3 NY", which is only "I <3 NY" if interpreted as text/html. Both values should have been the same for xml and escaped modes.


(Or, if you disagree, tell me what <title mode="escaped" type="text/plain">I &lt;3 NY</title> would mean?)

Graham

OK, let's take a step back. Seen in the wild are a whole bunch of variations.


I have seen the equivalent of:

1: I &lt;3 NY
2: I &amp;lt;3 NY
3: I <strong>&lt;3</strong> NY
4: I &lt;strong&gt;&amp;lt;3&lt;/strong&gt; NY

You will also see occasionally "I <3 NY", which is not-well formed XML, so let's ignore that one.

What I desire is a way of unambiguously distinguishing between the four cases I have enumerated above, so that it is safe for people to have discussions about <title> tags. [1]

The way I have approached this to date is to observe that the first and the third only differ in whether or not there intends to be markup which is to be interpreted (this is the mime type parameter); and the even ones differ from the odd ones in that there is an additional level of escaping present (mode).

My motivation is not to outlaw any of the four varieties that are expressed above, merely to request that people annotate which one that they are using so that such things can be unabiguously resolved. Hence, my recommendation is that the above should be annotated as:

1: mode="xml" type="text/plain"
2: mode="escaped" type="text/plain"
3: mode="xml" type="text/html"
4: mode="escaped" type="text/html"

... where mode="xml" and type="text/plain" are the default if not specified.

Do you have an alternate suggestion?

- Sam Ruby