Re: Valid but Semantically Incorrect

chuck.han@autodesk.com wrote:
> 
> Though this thread is from 11/99, I have some additional comments and questions that perhaps Jon (or anyone else, of course) can comment on:
> 
> 1. I am disappointed that attributes such as transform only take strings, and that something like transform="fe, fi, fo" would not be caught by a validator 

Not by a DTD-based validator, certainly. But then, it is weel known that
DTDs have many deficiencies.

> (it is just ignored by the Adobe plugin, no error message or anything). I'm wondering if you can shed some light as to why some attributes are not specified better. 

They are specified better, in the spec, but that is for humans. Better
specification for machines comes from using W3C XML Schemas, and there is
ongoing work to develop a schema for SVG.

>  For example, transform="translate(1,2)" could be broken up into: translateX="1", translateY="2".

Which would be ambiguous - in what order are these two transformations
applied (ok, it does not matter in this case - replace translateX with
rotate). Remember that the order of attributes need not be preserved by an
XML parser.

Also, what would be the effect if a transform were specified both by the
attributes you suggest and also by a matrix?

Lastly, your proposal would not detect the error case that started your
message:

translateX="fe", translateY="fi"

In other words, the transformation is atomic and the best way to design it
is thus as a single attribute. The syntax is described in the spec, can be
checked with a special validator (since it uses BNF) and soon, will be
validatable with a general-purpose XML Schema validator.

But I see that you were thinking along similar lines ...


> 2. Is there an accepted (I know, this is a charged word) version of the SVG schema in W3C XML Schema, 

Not yet. When there is, it will be announced here.

--
Chris

Received on Friday, 1 September 2000 21:23:11 UTC