Re: SVG12: height/width defaults

* Craig Northway wrote:
>SVG needs to specify how to calculate some intrinsic sizing properties 
>to enable inclusion within other languages. The intrinsic width and 
>height of the viewport of SVG content must be determined from the width 
>and height attributes. *If these are not specified, the default values 
>of 100% must be used.*
>
>The intrinsic aspect ratio of the viewport of SVG content is necessary 
>for example, when including SVG from an object tag in XHTML styled with 
>CSS. The intrinsic aspect ratio must be calculated based upon the 
>following rules:
>
>    * If the width and height of the root SVG element are both specified
>      in absolute units (in, mm, cm, pt, pc, px) then the aspect ratio
>      is calculated from the width and height after resolving both
>      values to the same units.
>    * If either/both of the width and height of the root svg are in
>      percentage units, the aspect ratio is calculated from the width
>      and height of the viewBox. If the viewBox is not present, or set
>      to 'none', the intrinsic aspect ratio cannot be calculated and is
>      unspecified.

There are several problems here,

  * the px unit should not be referred to as absolute unit as CSS
    considers it a relative unit.

  * the algorithm does not define the result for height and width in
    user units, em, ex, etc. 

  * the prose about the various attribute values is difficult to read
    (e.g., what is the result if the viewBox attribute is "present" but
    has an unsupported value and is thus ignored?)

  * "the root SVG element" and "the root svg" seems inconsistent and
    misleading.

And the dependency on the view specifications on the root svg element is
inconsistent with SVG 1.1 where the view specification might be in the
fragment identifier for the SVG document and authors would expect these
to be considered when the intrinsic aspect ratio is determined. With
http://www.w3.org/TR/2005/WD-SVGMobile12-20050413/ probably aswell, but
section 14.3.2 does not make much sense to me, e.g.

  Note: characters in fragment identifiers that are outside the
  repertoire of US-ASCII must be encoded using UTF-8 and %HH escaping
  if the value of the XLink href attribute is converted to a URI for
  resolution. [RFC3987]

is highly misleading (NFC-normalization is sometimes required aswell)
and

  #svgView(transform(translate(0,200,1000,1000),scale(3))

uses a 4-parameter translate that's not defined in the draft.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Monday, 23 May 2005 05:14:42 UTC