Subject: Re: [netmod] Y34: use cases for anydata

From: Phil Shafer <[email-masked]>
Date: Mon, 2 Feb 2015 14:59:48 -0500

Ladislav Lhotka writes:
>I didn't say that. My proposal is to have the same rule for all
>encodings, including XML: anyxml value is any content that's well-formed
>for the given encoding.

That will surely lead to trouble, since it ties the data to
the encoding.  If the code says something like:

   get_some_info (client) {
       xml = get_some_xml_content();
       response = new response(client);
       response->encode("answer", xml);
       return response;
   }

The sender knows the model requires the "answer" to be anyxml, but
doesn't want/need to know that some particular client is using a
particular encoding.

Thanks,
 Phil

---

From: Ladislav Lhotka <[email-masked]>
Date: Tue, 03 Feb 2015 17:43:22 +0100

> doesn't want/need to know that some particular client is using a

The server should know which encodings the client is prepared to
handle. Imagine the communication is performed in natural languages
instead: if the client indicates support for Czech and English, the
server can successfully send the same information in either language,
although syntactically the messages will be completely different.

Lada

-- 
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C