- From: Dave Crocker <dcrocker@brandenburg.com>
- Date: Mon, 30 Apr 2001 15:10:19 -0700
- To: Jacob Palme <jpalme@dsv.su.se>
- Cc: discuss@apps.ietf.org
(This is a re-posting, because I did not get a copy of the first posting from the re-mailer. /d) At 11:29 AM 4/24/2001, Jacob Palme wrote: >RFC822 example: > From: Father Christmas <fchristmas@northpole.arctic> > >The XML encoding uses five times as many characters. > <from> > <user-friendly-name>Father Christmas</user-friendly-name> > <e-mail-address> > <localpart>fchristmas</localpart> > <domainpart> > <domainelement>northpole</domainelement> > <domainelement>arctic</domainelement> > </domainpart> > </from> Alas, it uses far more than that... > <from> > <user-friendly-name> <friendly-name-char>F</friendly-name-char> <friendly-name-char>a</friendly-name-char> <friendly-name-char>t</friendly-name-char> <friendly-name-char>h</friendly-name-char> <friendly-name-char>e</friendly-name-char> <friendly-name-char>r</friendly-name-char> <friendly-name-char> </friendly-name-char> <friendly-name-char>C</friendly-name-char> <friendly-name-char>h</friendly-name-char> <friendly-name-char>r</friendly-name-char> <friendly-name-char>i</friendly-name-char> <friendly-name-char>s</friendly-name-char> <friendly-name-char>t</friendly-name-char> <friendly-name-char>m</friendly-name-char> <friendly-name-char>a</friendly-name-char> <friendly-name-char>s</friendly-name-char> </user-friendly-name> > <e-mail-address> > <localpart> <localchar>f</localchar> <localchar>c</localchar> <localchar>h</localchar> <localchar>r</localchar> <localchar>i</localchar> <localchar>s</localchar> <localchar>t</localchar> <localchar>m</localchar> <localchar>a</localchar> <localchar>s</localchar> </localpart> > <domainpart> > <domainelement> <domainchar>n</domainchar> <domainchar>O</domainchar> <domainchar>r</domainchar> <domainchar>t</domainchar> <domainchar>h</domainchar> <domainchar>p</domainchar> <domainchar>o</domainchar> <domainchar>l</domainchar> <domainchar>e</domainchar> </domainelement> > <domainelement>arctic</domainelement> <domainchar>a</domainchar> <domainchar>r</domainchar> <domainchar>c</domainchar> <domainchar>t</domainchar> <domainchar>i</domainchar> <domainchar>c</domainchar> </domainelement> > </domainpart> > </from> >It does have, however, the advantage that you need not have special >rules for each new punctuation character which occurs as in the >RFC822 variant. Each of the strings has different permissible sets of characters, so in fact you do need to have special rules for each type of string. Of course, the real purpose of extending the example is to show that the example can be biased at the whim of the writer, exactly as Keith has been trying to explain. Efficiency vs. ease of use are a juggling act. Note, for example, that RFC822 and domain parsers are plentiful, so calling for their use is reasonable. Hence while the original XML is rationale, an equally plausible choice is: > <from> > <display-name>Father Christmas</display-name> > <localpart></localpart> > <addrspec>fchristmas@northpole.arctic</addrspec> > </from> Serendipitous we have a real-world example of a design choice made for exactly this circumstance, from <draft-klyne-message-rfc822-xml-01.txt>. It chose a somewhat different balance from either example: > <rfc822:from> > <emx:Address> > <emx:adrs>mailto:Pooh@PoohCorner.100Aker.org</emx:adrs> > <emx:name>Winnie the Pooh</emx:name> > </emx:Address> > </rfc822:from> It is still an early draft, so one might imagine some further optimization, for improved conciseness... d/ ---------- Dave Crocker <mailto:dcrocker@brandenburg.com> Brandenburg InternetWorking <http://www.brandenburg.com> tel: +1.408.246.8253; fax: +1.408.273.6464
Received on Monday, 30 April 2001 18:16:03 UTC