Subject: [core] On Content Transcode

From: Yusuke DOI <[email-masked]>
Date: Thu, 24 Jul 2014 06:48:29 +0900

Hi,

With regards to content transcoding of core-http mapping, let me
describe (expected) use case on SEP2 (now IEEEP2030.5).

http://tools.ietf.org/html/draft-ietf-core-http-mapping-04#section-6.3.3

[Background]

Unlike CBOR, EXI does not have one-to-one mapping with XML instance. EXI
can encode XML document in various ways: schemaless, schema-informed,
bunch of options, profiles... etc. In particular, schema-informed
encoding make use of a XML schema as a grammar. Thus, even a slightest
difference in the schema may break interoperability in EXI. So,
something like footype+exi is not sufficient if the content is expected
to be encoded in schema-informed EXI. (It is reasonable to use
schemaless EXI in that case).

To deal with the issue, SEP2 defined two media types: sep-exi and sep+xml.

http://www.iana.org/assignments/media-types/application/sep-exi
http://www.iana.org/assignments/media-types/application/sep+xml

So, if some node try to speak SEP2 over CoAP (though, SEP2 spec is
defined in HTTP), a trancoder should be aware of the schema as part of
media type.

 --

What I'd appreciate if the document can mention such specific case are
out of the scope of the document and the implementor should be
responsible and be aware of the side-effect (may not specific to EXI
cases). In particular, schema-informed EXI will be mapped to
application/exi without any schema information OR
application/octet-stream. In-band metadata is lost in the case and the
proxy should be aware of the metadata required to manage the metadata
(schema, or any other application-specific data).

If I need to implement a transcoding proxy (though I have no plan to
make it by myself), I'd add per-path(regexp) configuration of
transcoding rule with such metadata.

Regards,

Yusuke