Re: Validator fails on PHP instructions inside attribute values

Dag-Erling Smørgrav, Mon, 02 Aug 2010 14:40:05 +0200:
> Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no> writes:
>> You can have unescaped angle brackets inside attribute values inside
>> SGML - at least according to the HTML4 validator. HTML5 also allows it
>> - at least according to Validator.nu. XHTML, including XHTMl5, does
>> not allow it. So "pre-validating" as HTML4 or HTML5, instead of as
>> XHTML, could be a solution.  [...]  Again, in SGML, PIs seem permitted
>> inside attributes.
> 
> ...but not in XML.  I wish the W3C could settle on either SGML or XML
> instead of maintaining two slightly incompatible HTML dialects.

Are there any W3 specs developed today which are based on SGML? HTML5 
is not based on SGML. 

Regarding temporarily validating as HTML5: it turns out that, even 
though HTML5 does not allow PI-s, it doesn't consider PI-s inside 
attributes as PI-s. (I guess that way, HTML5 shows its debt to XHTML 
...) Another thing, though, is that Richard wanted to place the PI-s 
inside the lang="*" attribute. And even the HTML4 DTD doesn't allow 
that. However, it is certainly possible to - as Philip suggested - 
create a HTML4 based DTD which does allow it. Or even to create a HTML5 
SGML-based DTD. 

Btw, when I discussed PI-s in the HTML5 WG a year ago,  I got to learn 
about a XHTML STRICT custom DTD based on PHPTAL:

http://www.mail-archive.com/phptal@lists.motion-twin.com/msg00806.html

I don't think, however, that it could automatically solve any problem 
for Richard, unless it is based on SGML instead of on XML.
-- 
leif halvard silli

Received on Monday, 2 August 2010 14:55:14 UTC