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

Re: Additional syntactic restrictions




Hello Chris,


As far as I understand, you are saying that:

Restricting a given XML protocol to UTF-8 only is a bad idea,
because (maybe among else) somebody then might construct/tweak
a parser so that it only accepts UTF-8 (which would no longer
be able to be called an XML parser), and then somebody else
mistakenly uses that parser to try and parse generic XML,
and this will lead to problems.

Now let's take a very similar situation: Somebody defines
an XML protocol with only one element, foo, and only one
attribute, bar. Somebody else then constructs/tweaks a
(non-validating) parser so that it only accepts elements
foo and attributes bar. Later that parser is misused
for some other piece of XML, and this leads to problems.

If we follow your logic, we would have to disallow
all XML protocols that use a finite number of element/
attribute types.

Regards, Martin.

P.S.: You write:

Suppose there is a protocol that uses XML, and is defined to only
allow UTF-8, and there is some special XML parser tweaked to give an
error when it meets UTF-16.

Just for the record: A conforming XML parser rejects quite a lot of UTF-16, namely all UTF-16 without a BOM. Such UTF-16 is still conforming according to ISO 10646, Unicode, or the IETF.


At 00:18 02/06/07 +0200, Chris Lilley wrote:


On Thursday, June 6, 2002, 10:19:10 PM, Gavin wrote:


GTN> On Thursday 06 June 2002 12:56 pm, Chris Lilley wrote: >> GTN> This is assuming a design for an XML-based protocol that allows >> embedding GTN> arbitrary XML content, >> >> No, its not assuming such a design. Its conceeding that some >> as-yet-unspecified IETF protiocol that uses XML might be used to >> transmit an XML payload. That doesn't seem like a stretch to me.

GTN> So how do you imagine UTF16 and UTF8 would be used in a single message?

Huh?

a) that's not what I said
b) its easy, multipart MIME messages, the cid url protocol to link
them, and using external parsed entities, but anyway
c) my actual point, which you seem to miss, is:

Suppose there is a protocol that uses XML, and is defined to only
allow UTF-8, and there is some special XML parser tweaked to give an
error when it meets UTF-16.

Suppose there is some software product using this almost-XML parser.

Suppose this product uses the above protocol to transport XML
contents, sometimes.

Suppose some programmer figures they can cut footprint by re-using the
parser that is already there

Now you have a situation that is the counter-claim to your
'restrictions in protocols cannot affect interoperability of content.

As i am sure you are aware, if you make a claim of impossibility it
takes only a single counter-case to disprove your claim.

QED.

Next question?

--
 Chris                            mailto:chris@xxxxxx