- From: Lloyd Wood <l.wood@eim.surrey.ac.uk>
- Date: Fri, 3 Aug 2001 13:49:20 +0100 (BST)
- To: Nick Kew <nick@webthing.com>
- cc: Bryce Nesbitt <bryce@obviously.com>, www-validator@w3.org
On Thu, 2 Aug 2001, Nick Kew wrote: > On Wed, 1 Aug 2001, Bryce Nesbitt wrote: > > > The validator first checks attributes, then the element. This means if I do something > > like: > > > > <csobj w="208" h="77" t="Button"> > > > > I get a long series of complaints about each attribute ("w", "h", "t") before > > I find that the validator actually does not understand the <csobj>. > > The reason for this is the event-driven parser used (basically James > Clark's SP). The parser generates an event at the end of whatever > fragment of text generates the message, thereby avoiding what would > otherwise be lots of additional complexity and potential ambiguity. > > So in the line > <csobj w="208" h="77" t="Button"> > 1 2 34 > events triggering parser messages are generated at 1, 2, 3 and 4 in > that order. > > (readers whose mailer uses a proportional font - upgrade it now and the > above will make sense :-) > > Given this, rearranging the messages in the validator is not easy. > > Now, the W3 validator involves a Perl CGI script as a wrapper for > nsgmls (an SP parser application it uses to generate the messages). > The Perl script simply reports messages in the order they are generated, > and is already doing a rather complex and potentially error-prone job > parsing them To do otherwise could be interesting, but would risk > breaking badly. It strikes me that the perl script could use nested lists and <SMALL> to split these out; unknown tags (csobj or 0 in the above example) would show up in the leftmost column, and it would be clear that fixing something in the outermost list (an unknown csobj) would probably deal with items in lists further in (all the unknown tags) - even if they are reported first. A single long list of bullet points doesn't really pass on this kind of structural information; I've never found the 'Error: start tag was here' to be much use. L. <L.Wood@surrey.ac.uk>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>
Received on Friday, 3 August 2001 08:50:37 UTC