From: Jim S. <ja...@ne...> - 2004-09-07 15:17:36
|
Arno Brinkman wrote: >I agree that CDATA seems too be not very usefull (due the ]]>), beside your >example there's another way in xml to represent characters that aren't >excepted by their normal form : > >------------------------------------------- >4.1 Character and Entity References > >[Definition: A character reference refers to a specific character in the >ISO/IEC 10646 character set, for example one not directly accessible from >available input devices.] > >Character Reference > [66] CharRef ::= '&#' [0-9]+ ';' > | '&#x' [0-9a-fA-F]+ ';'[WFC: Legal Character] > > > Yes, this could be done, but keep in mind that an escaped character is 4 or 5 bytes where a base64 represented byte is 1.25 bytes. For large blobs, that's huge. The large question, however, is which is the more appropriate representation. There are roughly three cases: Mostly characters some binary, general mix of character and binary data, and mostly binary. Escaping individual characters would work for the first case, but I think this is extremely rare. BLR falls into the second category, but being able to see the ASCII inside of BLR is probably more dangerous than interesting. For heavily binary stuff like jpegs, gifs, and object files, escaping binary bytes loses heavily. -- Jim Starkey Netfrastructure, Inc. 978 526-1376 |