Re: "px" in the width/height attribute for IMG

On Mon, 2003-04-21 at 17:35, Jukka K. Korpela wrote:

> That's correct, since the error is not a reportable markup error. It does
> not violate the formal syntax specified by the DTD. Similarly,
> width="whatever I put here" is valid, in the technical sense of
> validation, but surely not correct. Since the width attribute can take
> percentage values too (e.g., width="100%"), it wouldn't even be possible
> to write a DTD that allows what the HTML specification allows and
> disallows everything else. That is, the permitted format of values cannot
> be described in SGML (or in XML).

To clarify, the above is true for DTD's, but XML Schemas (see eg. [1])
would allow these kind of restrictions.  OTOH, even the M12n of XHTML in
XML Schema working draft [2] doesn't contain them for the width
attribute (type Length or MultiLength).

[1] <http://www.w3.org/TR/xmlschema-2/#rf-pattern>
[2] <http://www.w3.org/TR/xhtml-m12n-schema/schema_module_defs.html#a_smodule_XHTML_Datatypes>

-- 
\/ille Skyttä
ville.skytta at iki.fi

Received on Monday, 21 April 2003 11:23:56 UTC