W3C home > Mailing lists > Public > www-validator@w3.org > August 2010

Re: Validator fails on PHP instructions inside attribute values

From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Date: Mon, 2 Aug 2010 16:54:39 +0200
To: Dag-Erling Smørgrav <des@des.no>
Cc: Philip Taylor (Webmaster, Ret'd) <P.Taylor@Rhul.Ac.Uk>, Richard Ishida <ishida@w3.org>, 'David Dorward' <david@dorward.me.uk>, www-validator@w3.org
Message-ID: <20100802165439088163.1e80483e@xn--mlform-iua.no>
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:


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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:59:18 UTC