10:15
<MikeSmith>
hsivonen: in the message-emitter code, I don't see that there's currently any way to change the type of a MessageType
10:15
<MikeSmith>
I see the getSuperType method, but no setSuperType
10:17
<MikeSmith>
I assume I'll need to add a property and method to each of the message type classes?
11:44
annevk2
should really sleep some more but is amusing himself with public-html email
14:03
<murr4y>
is there a reason why the w3c html5 validator doesn't recognize <meta charset="utf-8">, other than that it's experimental?
14:10
<hsivonen>
murr4y: bug in the Perl front end
14:12
<murr4y>
aha
14:12
<hsivonen>
(already reported)
14:13
<hsivonen>
MikeSmith: I don't have the source code or an svn client on this computer, so I'm going from memory
14:14
<hsivonen>
in MessageEmitterAdapter, trace the call tree from error(SAXException) down to message(Type,...)
14:15
<hsivonen>
in the method highest in the tree (maybe error() itself, I forget) that first calls message(Type, ...) with an Error subclass of Type as the argument, do the following
14:16
<hsivonen>
use instanceof the check if the SAXException is a RELAX NG error sbclass that wraps DataTypeExceptions
14:16
<hsivonen>
if t is, itereate over the DataTypeExceptions and use instanceof to see if any one of them is an Html5DatatypeException
14:16
<karlcow>
http://dev.w3.org/cvsweb/validator/httpd/cgi-bin/check?rev=1.719&content-type=text/x-cvsweb-markup
14:17
<hsivonen>
on Html5DatatypeExceptions, call isWarning()
14:18
<hsivonen>
if you mamage to get a return value true from even one Html5DatatypeException by doing this, call the message method with Warning as the Type argument
14:18
<hsivonen>
otherwise, use Error as Type the way it's used now
14:18
<hsivonen>
that should be about it
14:18
<hsivonen>
the instanceof code will look ugly :-(
14:19
<hsivonen>
MikeSmith!
14:19
<hsivonen>
MikeSmith: I just tried to answer you question
14:19
<MikeSmith>
hsivonen: hey
14:19
<MikeSmith>
I think I got it figured out
14:20
<MikeSmith>
oh
14:20
<MikeSmith>
didn't see it
14:20
<hsivonen>
MikeSmith: did you arrive at the same conclusion as what I just wrote in the log?
14:20
<MikeSmith>
I'll take a look at the logs now.. hang on
14:20
<hsivonen>
http://krijnhoetmer.nl/irc-logs/whatwg/20091121#l-167
14:21
<hsivonen>
s/mamage/manage/
14:21
hsivonen
also doesn't have a proper keyboard on this computer
14:37
<MikeSmith>
hsivonen: sorry, got distracted of a bit
14:38
<MikeSmith>
hsivonen: so the part about tracing the call tree I had figured out
14:38
<MikeSmith>
so that part was fine
14:39
<MikeSmith>
but the part about calling the message method with Warning as the type -- I can't see how to actually do that
14:39
<MikeSmith>
because the call to message is way further down
14:39
<TabAtkins>
Hahaha, my random doctypes are already spreading like a virus!
14:40
<hsivonen>
MikeSmith: you need to downcast
14:40
<Dashiva>
TabAtkins: Random doctypes?
14:40
<TabAtkins>
http://www.xanthir.com/etc/doctype.php
14:40
<TabAtkins>
Triggers standards mode.
14:41
<Dashiva>
<!DOCTYPE html SYSTEM "crimson-wombat">
14:41
<hsivonen>
if (dte instanceof Html5DatatypeException) { Html5DatatypeException hdte = (Html5DatatypeException)dte; if (hdte.isWarning()) {...}}
14:41
<TabAtkins>
I got someone to cargo-cult "mediumorched-mynah bird" in their page. ^_^
14:41
<hsivonen>
and the same pattern for the SAXException itself
14:41
<TabAtkins>
s/orched/orchid/
14:42
<MikeSmith>
hsivonen: ah, OK
14:48
<MikeSmith>
hsivonen: so not knowing, what I had ended up doing was adding setSuperType and setSubType and setPresentationName methods to the MessageType class, and then I changed all the subclasses so that their contents are just a constructor that sets the superType and subType and presentationName
14:50
<MikeSmith>
hsivonen: I'll pastebin the patch so you can see what I mean
14:54
<MikeSmith>
hsivonen: http://pastebin.ca/1680958
14:55
<MikeSmith>
oops
14:56
<MikeSmith>
hsivonen: minus the stuff at lines 31-33 of the diff
14:56
<MikeSmith>
(that's just some clumsy debugging I had added earlier and forgot to revert)
15:07
<hsivonen>
MikeSmith: the Type instances were supposed to be immutable singletons, IIRC.
15:07
<hsivonen>
MikeSmith: so adding setters isn't geed
15:07
<hsivonen>
good
15:07
<MikeSmith>
OK
15:07
<Lachy>
I find it ironic that a proposed solution to the level of indirection problems inherent to xmlns and prefixes, is to add another level of indirection on top with the unobtrusive namespace proposal.
15:08
<hsivonen>
can you hoist the instanceof stuff into the method that call message with a Type argument?
15:08
<hsivonen>
and pass a different singleton argument there?
15:08
<TabAtkins>
Lachy: That's not inherently a bad approach. It may be that the xmlns style of indirection is confusing and/or inadequate, but a different style of indirection is more natural.
15:09
<TabAtkins>
Lachy: Not saying that Liam's suggestion is good; I still don't have a real opinion of it.
15:09
<TabAtkins>
What was the issue that needed a change proposal that basically said "Keep the status quo"?
15:12
<Lachy>
In Krzysztof's latest reply, he's now suggesting that browsers would simply recognise URIs of known namespace definition files, so they wouldn't need to request them
15:13
<Lachy>
that effectively makes the namespace definition files themselves useless, and it's just reinventing profile=""
15:13
<TabAtkins>
Indeed.
15:14
<Lachy>
though, of course the problems I outlined in my previous mail would still exist for unrecognised URIs, assuming the idea is still for browsers to request them. (If not, then it doesn't really solve any sort of distributed extensibility problems)
15:15
<Lachy>
basically, the whole underlying concept behind the unobtrusive namespace proposal is fundamentally flawed, no matter how you look at it.
15:16
<TabAtkins>
I'd probably agree. It's as flawed as DTDs, and look where that ended up.
15:17
<MikeSmith>
hsivonen: no, I'm not sure how I can. That's the problem -- there are conditionals earlier in the main message() method that check to see whether the exception is an error or a warning, then calls to messageWithExact, etc., get made after that
15:17
MikeSmith
is about to run out of battery power
15:21
<Philip`>
Lachy: I don't think the proposals were trying to solve the problem of levels of indirection, they were just trying to solve the problem "HTML people don't like XML namespaces" by making anything that's not quite the same as XML namespaces in the hope that people will like it more
15:23
<Philip`>
and not directly addressing the fundamental concerns about indirection and complexity and desirability of extensions etc
15:25
<hsivonen>
MikeSmith: I think you need the instanceof on SAXException in two places
15:26
<hsivonen>
in the current place and higher up when the Type object is chosen
15:28
<MikeSmith>
hsivonen: OK
15:28
<MikeSmith>
I think I see now what I can do