>Um, isn't this because those characters would be illegal attribute
>values?  (Since attrs have to follow different and much more strict
>rules about allowable characters than text content).

As far as I can tell, the XML REC says the only constraints attribute
values havethat aren't shared by other text content are the obvious ones
resulting from their being quoted strings ("" strings can't contain ", ''
strings can't contain '), plus not being allowed to reference external
entities or contain the '<' character. (Productions 41 and 10 in the spec
and their associated well-formedness statements.)

Haven't checked the HTML spec to find out whether it imposes different
rules, but I don't remember it doing so. The XSLT spec does say that HTML
attributes which contain URI values should be escaped as per the
recommendations in the HTML spec rather than via normal XML/SGML escaping,
but I didn't think that applied to this case.


______________________________________
Joe Kesselman  / IBM Research


Reply via email to