W3C home > Mailing lists > Public > www-svg@w3.org > January 2011

Re: Defect in "An SVG Primer for Today's Browsers" - syntax errors in example

From: ddailey <ddailey@zoominternet.net>
Date: Thu, 13 Jan 2011 00:18:06 -0500
Message-ID: <CAA1FF76EA1144058380A69B067AB64F@disxgdg31szkx7>
To: "G Be" <gbe8086@yahoo.com>, <www-svg@w3.org>
Thanks, and yes. I have made a note to myself to correct this in the next 
round of updates.

Just fyi, Phil Archer and Doug Schepers and I have actually been making 
exactly some of these corrections over the past few months.... slowly but 
surely! Using this book as the centerpiece of a recent course has sifted out 
lots of impurities!

cheers
David
----- Original Message ----- 
From: "G Be" <gbe8086@yahoo.com>
To: <www-svg@w3.org>
Sent: Wednesday, January 12, 2011 8:33 PM
Subject: Defect in "An SVG Primer for Today's Browsers" - syntax errors in 
example


"Chapter II: SVG Basics"
  "3. Operations: Grouping, Reusing, Scaling, Translation and Rotation"
     "6. use" seems to contain two errors

1.  The example "Reusing code (with modifications) — the <use> tag"
<g fill="black">
<g id="G">

<rect x="100" y="100" width="100" height="20" fill="inherit" />
<rect x="100" y="160" width="100" height="20" fill="inherit" />
<ellipse cx="150" cy="140" rx="30" ry="100" fill="#777" />
<rect x="100" y="130" width="100" height="20" fill="inherit" />

</g></g>
<use xlink:href="G" transform="translate(120,0)" fill="#bbb">

I think the "<use ...>" element is a missing the trailing '/' and should be 
"<use .../>", i.e.
<use xlink:href="G" transform="translate(120,0)" fill="#bbb"/>

2.  The reference 'xlink:href="G"' doesn't work in my browsers (Safari, 
Firefox, Chrome, Opera), but it does work with 'xlink:href="#G"'
Received on Thursday, 13 January 2011 05:18:40 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:47 GMT