Re: Adding custom attributes through XMLSchema



On Mon, 7 Nov 2005, Jukka K. Korpela wrote:

> You cannot know which attributes are unknown to browsers.

Fair comment. For that matter you can't know whether some browser or
other isn't going to assign some special meaning to /anything/ that
you code in the source, no matter how harmless it might seem - even
comments!

> Besides, the principle of ignoring unknown attributes is just a
> description of actual browser behavior in the world of tag soup HTML
> - it was never specified as a requirement.

Well, I'd say it was established by RFC1866 section 4.2.1.

To facilitate experimentation and interoperability between
implementations of various versions of HTML, the installed base of
HTML user agents supports a superset of the HTML 2.0 language by
reducing it to HTML 2.0: markup in the form of a start-tag or end-
tag, whose generic identifier is not declared is mapped to nothing
during tokenization. Undeclared attributes are treated similarly. The
entire attribute specification of an unknown attribute (i.e., the
unknown attribute and its value, if any) should be ignored.

Browser implementers have usually followed similar guidelines (updated
according to the version of HTML they are aiming at, of course).

> So should you _rely_ on it?

I wouldn't recommend that in production; but "to facilitate
experimentation" I wouldn't rule it out.

.