perl-unicode

Re: In-Band Information Considered Harmful

1998-10-24 13:15:02
You, John Macdonald, wrote:
++ 
++ Whether the attribute also applies to a piece cut out of the middle
++ can certainly depend upon the sort of attribute.  If you extract "ll"
++ out of <URL>http://perl.com/foo/ll</URL> it is certainly not
++ appropriate to retain the URL attribute.  XML has many attributes
++ that imply that the data has a specific structure.  So, for those, it
++ only makes sense to retain the attributes that have *both* boundaries
++ included.  But, for something like <b>, it makes more sense to retain
++ the attribute even if the data comes from the middle of the range -
++ that is an attribute that applies individually to each component -
++ although even there you'll often not want the attributes carried
++ along, depending upon your purpose in copying (e.g. if you copy a
++ filename from one place into a command to execute, you don't really
++ want to retain the bold attribute - but the out-of-band mechanism
++ will certainly make it not important if the attribute does get
++ copied, an in-band keeping of the attribute might be a nuisance).

Well, doing it for <b> and not for <url> based on the *appearance*
of the characters is certainly odd. After all, with a style sheet,
<url> can certainly imply that its content is bold as well.

In fact, if you have:

   <p class = "foo"><b>Hello</b>
   <p class = "bar"><i>world</i>
   <p class = "baz">More text.

both the "ll" and the "rl" could have the attribute "bold", while the
"ex" might have the attribute "red".



Abigail