Any possible string of 8 bit bytes Sizes for these items are set in the individual data element definitions. What about basic machine concepts like endian-ness, floating point number format, sign extension, significant digits, precision and so on. The template is a flat file, based on a set of clearly defined semantics. EDI templates will have interpreters that understand these semantics. No, the templates will generate standard SQL or ODBC calls that will work with virtually any database.
Platform independence is another critical issue.
Using any protocol. Normally it will be HTTP'd or FTP'd, but it could equally well be sent as an e-mail attachment, BASE 64 or anything else you can negotiate over your networks. That depends on the negotiation that precedes it. Only in the sense that HTTP can use URLs for address resolution. In this respect, building a template for the attribute based example is probably the easiest solution because it involves no loops and you can map directly from named attributes to named database fields.