Return-Path: Mailing-List: contact general-help@xml.apache.org; run by ezmlm Delivered-To: mailing list general@xml.apache.org Received: (qmail 87783 invoked from network); 19 May 2000 10:28:10 -0000 Received: from pop.systemy.it (194.20.140.28) by locus.apache.org with SMTP; 19 May 2000 10:28:10 -0000 Received: from apache.org (pv27-pri.systemy.it [194.21.255.27]) by pop.systemy.it (8.8.8/8.8.3) with ESMTP id MAA28365 for ; Fri, 19 May 2000 12:28:08 +0200 Message-ID: <3925187F.ACE9700E@apache.org> Date: Fri, 19 May 2000 12:33:35 +0200 From: Stefano Mazzocchi Organization: Apache Software Foundation X-Mailer: Mozilla 4.72 [en] (Windows NT 5.0; I) X-Accept-Language: en,it MIME-Version: 1.0 To: general@xml.apache.org Subject: Re: Attribute and Element References: <4538F96A1478D211BEC40008C7A4CD9D0426E955@chiec01.eb.com> <39248B37.1225D23C@phoenix-pop.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N "K.C. Jones" wrote: > > Interesting discussion with lots of helpful tips and points > to consider -- even if it is off-topic. > > Anyway, I'm beginning to understand that there are simply no > hard and fast rules here. You are right. Many believe that element vs. attribute is a religious issue, not much different from browser wars, editor wars or os wars. > Consider SVG. SVG encodes vector > path information like: > > Where the 'd' attribute encodes the pen movement somehow. > Lots of learned XML-DEV experts had a cow about how long the > attributes were (the example is a very small one), how > unparsable and un XSLT-transformable the important path data > was. But the ruling requirement for SVG was compactness and > speed. I think they were right. I don't. People believe that XML is verbose and will load their bandwidth. This is the _totally_ wrong. In fact, it can be proved (based on pure information theory) that XML conveys more structured information, then, if the schema is a available at both ends, a schema-aware compressor is able to compress the XML entropy stream with _LESS_ bits than an equivalent xml-unaware compressor. The XMill people showed they achieve 5% more compression over BZip by simply using the XML syntax... they didn't even had to go down to schema. But they achieve this compression over the compressed text and I totally agree that a pure binary vector format (with a tuned-for compressor) would blow XML by an order of magnitude (like binary VRML showed). So binary is always smaller than text-encoded formats, but the point is XML verbosity and this doesn't count if a good compressor is used. Unfortunately, very few understand XML verbosity is, from an information point of view, fake. > So bear in mind that attributes can be long if need be. And > that the structure and relationships that come with entity > hierarchies come with some performance and efficiency costs > when compared to use of attributes. The use of entities is a form of compression and everyone knows that doing compression over compression is not a good thing to do. The SVG people clearly failed to understand the basics of network layering and compression. -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. Friedrich Nietzsche -------------------------------------------------------------------- Missed us in Orlando? Make it up with ApacheCON Europe in London! ------------------------- http://ApacheCon.Com ---------------------