From: P A Hill & E V Goodall (goodhill_at_xmission.com)
Date: Wed Jul 10 2002 - 18:57:54 CEST
Return-Path: <owner-cavexml-outgoing_at_ethz.ch> Delivered-To: cavexml-archive_at_cartography.ch Received: from localhost (localhost [127.0.0.1]) by karmail.ethz.ch (Postfix on SuSE eMail Server 2.0) with ESMTP id 2EC7414AB0 for <cavexml-outgoing_at_ethz.ch>; Wed, 10 Jul 2002 18:59:41 +0200 (CEST) Received: by karmail.ethz.ch (Postfix on SuSE eMail Server 2.0, from userid 28) id 0ABC714971; Wed, 10 Jul 2002 18:59:38 +0200 (CEST) Delivered-To: cavexml-loopcheck_at_ethz.ch Received: from localhost (localhost [127.0.0.1]) by karmail.ethz.ch (Postfix on SuSE eMail Server 2.0) with ESMTP id E7C9B14AB0 for <cavexml-loopcheck_at_ethz.ch>; Wed, 10 Jul 2002 18:59:37 +0200 (CEST) Received: by karmail.ethz.ch (Postfix on SuSE eMail Server 2.0, from userid 96) id C7F1781A2; Wed, 10 Jul 2002 18:59:35 +0200 (CEST) Delivered-To: cavexml_at_cartography.ch Received: from localhost (localhost [127.0.0.1]) by karmail.ethz.ch (Postfix on SuSE eMail Server 2.0) with ESMTP id 80A9014AB0 for <cavexml_at_cartography.ch>; Wed, 10 Jul 2002 18:59:35 +0200 (CEST) Received: from mgr3.xmission.com (mgr3.xmission.com [198.60.22.203]) by karmail.ethz.ch (Postfix on SuSE eMail Server 2.0) with ESMTP id DCCC278B9 for <cavexml_at_cartography.ch>; Wed, 10 Jul 2002 18:59:32 +0200 (CEST) Received: from mail by mgr3.xmission.com with spam-scanned (Exim 3.35 #1) id 17SKfv-0006jv-00 for cavexml_at_cartography.ch; Wed, 10 Jul 2002 10:50:47 -0600 Received: from [198.60.22.200] (helo=mail.xmission.com) by mgr3.xmission.com with esmtp (Exim 3.35 #1) id 17SKfv-0006jr-00 for cavexml_at_cartography.ch; Wed, 10 Jul 2002 10:50:47 -0600 Received: from goodhill.dsl.xmission.com ([198.60.114.17] helo=xmission.com) by mail.xmission.com with esmtp (Exim 3.22 #1) id 17SKfu-0007pk-00 for cavexml_at_cartography.ch; Wed, 10 Jul 2002 10:50:46 -0600 Message-ID: <3D2C6792.4010206@xmission.com> Date: Wed, 10 Jul 2002 10:57:54 -0600 From: P A Hill & E V Goodall <goodhill_at_xmission.com> User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4.1) Gecko/20020314 Netscape6/6.2.2 X-Accept-Language: en-us To: cavexml <cavexml_at_cartography.ch> Subject: SVG: Some "prior art: examples for your comtemplation Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Loop: cavexml Sender: owner-cavexml_at_karmail.ethz.ch Precedence: bulk Reply-To: cavexml_at_cartography.ch X-Virus-Scanned: by AMaViS perl-11
Looking through a complimentary copy of O'Reilly's
"SVG Essentials",
http://www.oreilly.com/catalog/svgess/
I thought I pass on a few examples of how this particular XML
format puts some data together. I thought I'd pass along these
examples of "prior art" in XML to show how information can be
made a little more compact, but still 'readable'.
A line in SVG looks like:
<line x1="30" y1="10" x2="80" y2="10">
You can group objects with
<g id="house" .... >
</g>
but this format doesn't just build rectangles or
polygons out of groups of lines. There are separate
constructs for circle, ellipse, polyline, rectangle and polygon.
[ Note a polyline is a series of joined lines that don't form
a closed polygon. ]
You might expect a polygon or polyline to have a
structure like:
<polygon ... >
<point ... >
...
</polygon>
Specifying one or more points, but SVG
defines the list of points in an attribute that has
a potentially long string value with a defined format
within it. For example:
<polygon points="48,16 16,96 96,48 0,48 80,96">
The points in the above polygon form a 5 pointed star.
Polygons and polylines also have complex information stuffed
in the style attribute. A value for style might look like
<polygon style="stroke: black; fill: none" points="..." >
I'm surprised they didn't invent either two attributes one each
for stroke and fill, or separate attributes for each of the other
more obscure stroke 'characteristics'(the SVG [XML?] term for each
inner 'thing' within the attribute).
There are a total of 7 stroke characteristics and 3 fill
characteristics, for example
<polygon style=" ... stroke-opacity=1.0 ; ... " ...>
It would seem to me that their choice of using multiple
"characteristics" per attribute instead of separate attributes,
makes it harder to do some XSL processing, but maybe I'm underestimating
the power of XSL. This choice of structured attributes
does save one character (there are not quotes around each value, but there is
a semicolon separating each) every time an extra characteristic is
listed in a style. That isn't much, but would have save some text with
a separate stroke and fill attribute, this would allow the inner
characteristics to not have the longer hyphenated name.
Now for a set of points it saves lot of characters (at minimum 8)
compared to some hypotethical separate tag for each point. For example a point
tag within a polygon tag couldn't be shorter than <P P=" ...">. The
saving when specify sets of points could run as higher than 100% overhead,
so we can appreciate why there would be motivation to do this.
There are other examples in SVG where the designers chose
a series of characteristics instead of a set of tags or set of attributes.
There some other similar definitions of characteristics within attributes
in the XML version of VRML.
On a side note, I believe I described SGML as XML, it is not. The
right name for the 3d XML standard is apparently X3D.
<X3D>
<Scene>
<Group>
<Viewpoint description="Start Position"
position="5.0 -1.0 0.0"
orientation="0.0 1.0 0.0 1.57"/>
<NavigationInfo type="EXAMINE"/>
<Transform translation="0.0 -5.0 2"
rotation="0.0 1.0 0.0 1.57"
scale="1.0 1.0 1.0">
<Shape>
<Box size="2 4 2"/>
<Appearance>
<Material diffuseColor="1.0 0.0 1.0"/>>
</Appearance>
</Shape>
</Transform>
</Group>
</Scene>
</X3D>
Which I found at:
http://www-ia.hiof.no/~michaell/kurs/vv/pages/moduler/shout3d_x3d/x3d.html
Note in the above the use of complex attributes.
For example of a working group that was defining their own XML spec,
see http://www.vrml.org/news/x3d/x3d-reqs.h3h.html
Just some food for thought.
cave softly,
-Paul
This archive was generated by hypermail 2b30 : Wed Jul 31 2002 - 23:00:00 CEST