| 06:19 | <Aleoss> | Can someone tell me how to fix/resolve the Tidy errors in my document? http://pastebin.org/67228 |
| 06:26 | <Vito`> | Aleoss: looks like Tidy doesn't like the HTML5 doctype, so it's not parsing the HTML entities |
| 06:26 | <Vito`> | because your page validates through html5.validator.nu |
| 06:27 | <Aleoss> | Vito: So is there a way I can make the entities validate through Tidy? |
| 06:27 | <Aleoss> | Vito: Or is that out of my control? |
| 06:29 | <Vito`> | I only see people complaining on it in a google search |
| 06:29 | <Vito`> | I'd guess out of your control until Tidy becomes HTML5-aware |
| 06:30 | <Vito`> | You could put in an HTML4 doctype to make sure your entities validate, and then ignore all the errors about the HTML5 stuff |
| 06:32 | <Aleoss> | Vito: I'm designing my page for HTML5 using HTML5 standards. I'm not going to test it through a doctype that I don't intend on using. That would leave room for REAL errors. |
| 06:32 | <Aleoss> | Vito: Thanks for confirming my conserns in regards to Tidy. |
| 06:36 | <Aleoss> | Truly is a pity.. |
| 06:37 | <Vito`> | Why are you using Tidy in particular? Isn't the other validator enough? |
| 06:37 | <Vito`> | (I've never personally used Tidy, so I don't know its benefits for < HTML5) |
| 06:40 | <Aleoss> | Vito: I like to use Tidy (Serial) + Total Validator (Serial with WAI-AAA WCAG) + W3 HTML Validator. |
| 06:42 | <Aleoss> | Vito: And if I'm really bored, I'll validate with cynthiasays.com as well. |
| 06:44 | <Aleoss> | Vito: Call it over-kill if you wish, but I call it getting the opinions of various sources to ensure 100% accessibility and validity. |
| 08:13 | <a1> | Hello |
| 08:13 | <a1> | Is this the place to ask questions about HTML5? |
| 08:14 | <Vito`> | that's what the topic in #html says ;) |
| 08:15 | <a1> | My question: is it possible to add <audio> tag from javascript, make it play file from some javascript scalar; it contains actual OGG data and not link to it? |
| 08:16 | <a1> | var audioElement = document.createElement('audio'); audioElement.setAttribute('src','data:audio/ogg;'+data);audioElement.play(); |
| 08:16 | <a1> | this doesn't work |
| 08:17 | <a1> | Converting to base64 with javascript seems to be pretty slow |
| 08:18 | <Vito`> | how interesting |
| 08:18 | <Vito`> | does it work with a data URL without using javascript to inject the whole thing? |
| 08:18 | <Vito`> | as a regular <audio> tag in the page? |
| 08:19 | <Vito`> | the notes on MDC around data URLs say you shouldn't expect long data URLs to work everywhere, and I imagine an OGG file would be huge |
| 08:20 | <a1> | It works in firefox; 2MB ogg file |
| 08:20 | <a1> | It doesn't have to be data: |
| 08:21 | <a1> | I just want to play file I have stored in javascript variable. |
| 08:22 | <a1> | I actually only need this to work on firefox, as I'm writing a greasemonkey script |
| 08:32 | <Vito`> | a1: are you actually adding the element to the page? appending it to the body or some such? and have you tried delaying the play to make sure it has time to attach to the DOM? |
| 08:33 | <Vito`> | I haven't tried this myself but if it works with a data URL as part of the HTML, I'd expect it to also work when it's injected |
| 08:33 | <a1> | I'll try |
| 08:53 | <roc> | a1: that shoudl work |
| 08:53 | <roc> | the element doesn't need to be in the DOM |
| 08:54 | <roc> | if you base64 encode the data, you need to add 'base64' to your data: URL |
| 08:54 | <a1> | I think one problem is that 'data:audio/ogg;'+data should be 'data:audio/ogg;'+encodeURI(data) |
| 08:55 | <erlehmann> | a1, roc, cn you repost the offending data URI ? |
| 08:55 | <erlehmann> | just joined |
| 08:55 | <a1> | no, it's nothing |
| 08:55 | <a1> | problem in me, not data |
| 08:56 | <zcorpan> | al, it should be a comma, not a semicolon |
| 08:56 | <zcorpan> | s/al/a1/ |
| 08:57 | <erlehmann> | … anyone visiting Berlin for christmas and attending 26C3 ? (Won't ask again.) |
| 09:03 | <GPHemsley> | Does HTML5 define named entities? Or point to a reference of them somewhere else? |
| 09:04 | <zcorpan> | it defines them |
| 09:04 | <GPHemsley> | Oh, found it: Section 9.6 |
| 09:05 | <GPHemsley> | Called them "Named character references" |
| 09:05 | <zcorpan> | yeah, they were called entities before |
| 09:05 | <zcorpan> | but people said it clashed with xml's terminology |
| 09:06 | <GPHemsley> | ah |
| 09:07 | <GPHemsley> | Hixie: It'd be nice if that table also had a column that showed what the symbols looked like (e.g. by using the &#x....; form and letting the browser render them) |
| 09:09 | <zcorpan> | GPHemsley: there are nicer interfaces than a big table if you want to find and use a character... |
| 09:10 | <GPHemsley> | zcorpan: True. But my mind always goes straight to source when wondering about something. |
| 09:12 | <GPHemsley> | Hixie: BTW, the definition of "Named character references" in section 9.1.4 is in conflict with the table in section 9.6, specifically with regard to the point about having to end in a semicolon. The table has duplicate entries for NCRs that do not end with a semicolon (presumably, for backwards compatibility). |
| 09:14 | <zcorpan> | GPHemsley: 9.1.4 excludes those without semicolon |
| 09:15 | <GPHemsley> | zcorpan: Is that not the only place that references the NCRs defined in 9.6? |
| 09:15 | <GPHemsley> | IOW, wouldn't that make the NCRs without a semicolon in 9.6 orphans? |
| 09:17 | <zcorpan> | the parser also references 9.6 |
| 09:17 | <GPHemsley> | which section is that? |
| 09:17 | <zcorpan> | 9.2 |
| 09:19 | <GPHemsley> | hmm... can't find where; do you have a subsection? |
| 09:19 | <zcorpan> | 9.2.4.70 Tokenizing character references |
| 09:20 | <GPHemsley> | ah, that's why... 9.2.4 is a separate page :P |
| 09:22 | <GPHemsley> | zcorpan: So, are you referring to the "Anything else"."Otherwise, ..." part? |
| 09:25 | <zcorpan> | i see 2 references to 9.6 in "anything else" |
| 09:26 | <GPHemsley> | right... I'm asking specifically about the NCRs that do not end in a semicolon |
| 09:26 | <zcorpan> | what about them? |
| 09:27 | <Dashiva> | "Otherwise, if the next character is a U+003B SEMICOLON, consume that too. If it isn't, there is a parse error." |
| 09:27 | <Dashiva> | That part? |
| 09:27 | <GPHemsley> | zcorpan: well, you said they weren't orphans and/or that they were excluded from 9.1.4 |
| 09:28 | <GPHemsley> | Dashiva: No, "Otherwise, return a character token for the character ..." |
| 09:28 | <GPHemsley> | zcorpan: So I was asking where they were included. |
| 09:28 | <zcorpan> | if the input is fooäbar then the parser will treat it as fooäbar |
| 09:28 | <zcorpan> | with a parse error |
| 09:29 | <zcorpan> | "Consume the maximum number of characters possible, with the consumed characters matching one of the identifiers in the first column of the named character references table (in a case-sensitive manner)." |
| 09:29 | <GPHemsley> | right, that's what I was asking about |
| 09:31 | <GPHemsley> | I see, so the ones without the semicolon are still processed, but they also raise a parse error? |
| 09:31 | <zcorpan> | yes |
| 09:31 | <GPHemsley> | If, however, you use an NCR that does not have a semicolon-less counterpart, then it's just a parse error and nothing is shown, or everything is shown? |
| 09:32 | <zcorpan> | then it's a parse error but the entity is not replaced |
| 09:32 | <zcorpan> | because it's not an entity |
| 09:32 | <GPHemsley> | so, it's displayed as literal? |
| 09:32 | <zcorpan> | yes |
| 09:32 | <GPHemsley> | gotcha, OK |
| 09:32 | <GPHemsley> | thanks |
| 09:35 | <a1> | I managed to get it to work |
| 09:35 | <a1> | The problem was that data I was getting from xmlhttprequest was interpreted as utf-8 string |
| 09:36 | <a1> | and was base64 encoded incorrectly |
| 09:36 | <a1> | Thanks |
| 09:39 | <zcorpan> | a1 wants xhr2's responseBody |
| 09:41 | <zcorpan> | or possibly <audio src> |
| 09:50 | <GPHemsley> | Does HTML5 make any requirements for the style of the bullet for <li> with regard to embedded lists? |
| 09:51 | <gsnedders> | GPHemsley: No, HTML 5 has no rendering requirements |
| 09:54 | <GPHemsley> | gsnedders: Hmm... that's not entirely true: http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#punctuation-and-decorations |
| 09:55 | <GPHemsley> | But for some reason it specifies differing/alternating styles for embedded uls, but not embedded ols |
| 09:56 | <gsnedders> | That's non-normative |
| 09:56 | <gsnedders> | So it doesn't require anything :P |
| 09:56 | <GPHemsley> | :P |
| 09:57 | <GPHemsley> | looks like I'll have to specify ol[type] |
| 09:57 | <zcorpan> | type is invalid |
| 09:57 | <GPHemsley> | ugh, was just looking that up |
| 10:10 | <a1> | It's me again with same question. |
| 10:10 | <a1> | I have a javascript scalar contatining OGG stream |
| 10:11 | <a1> | it starts with "OggS\0\2" and contains some music I'd like to be able to play with it |
| 10:11 | <a1> | with <audio> tag |
| 10:12 | <a1> | It's possible to play it by setting src attribute of audio to 'data:audio/ogg;base64,'+encode64(a) |
| 10:12 | <a1> | but encoding huge sound file with javascript is very slow |
| 10:12 | <a1> | my browser freezes |
| 10:12 | <a1> | So I'm asking |
| 10:12 | <a1> | is there a way to set data of <audio> tag, and not source of that data with javascript? |
| 10:16 | <zcorpan> | no |
| 10:16 | <zcorpan> | do you need to base64 it though? |
| 10:16 | <a1> | well, it's binary data |
| 10:17 | <zcorpan> | sure |
| 10:17 | <a1> | 'data:audio/ogg,'+a doesn't work |
| 10:17 | <zcorpan> | does encodeURIComponent(a) work? |
| 10:17 | <a1> | 'data:audio/ogg,'+encodeURIComponent(a) |
| 10:17 | <a1> | this? |
| 10:17 | <a1> | No.. |
| 10:18 | <zcorpan> | hmm, wonder why not |
| 10:18 | <jgraham> | zcorpan: encodeURIComponent does something quite different |
| 10:18 | <jgraham> | Doesn't it? |
| 10:19 | <jgraham> | Oh wait |
| 10:19 | <a1> | Output of encodeURIComponent(a) seems to be okay... |
| 10:19 | <a1> | "OggS%00%02%00%00%00%00%00%00%00%00'%EF%9F%B7%EF%9E%83Z%00% |
| 10:19 | jgraham | was answering a different question |
| 10:20 | <jgraham> | a1: Have you tried using a2b or whatever it's called, in browsers that support it? |
| 10:20 | <zcorpan> | atob |
| 10:22 | jgraham | wonders why that isn't a part of html5 |
| 10:22 | <zcorpan> | file a bug? :) |
| 10:26 | <a1> | It's data I get from XMLHttpRequest, and characters that >127 need to be and-ed with 0xff |
| 10:26 | <a1> | calling btoa on that results in exception |
| 10:29 | <zcorpan> | why do you get the data with xhr rather than with <audio src>? |
| 10:30 | <a1> | Basically, it's a jpg image catenated with ogg audio file. I can't just specify that as source of <audio> |
| 10:30 | <a1> | I get it with xhr, throw away jpeg data, and feed what's left to <audio> |
| 10:31 | <jgraham> | OK new question: Why do you have a JPEG image concated with an OGG audio file? |
| 10:31 | <a1> | some widely used discussion board allows uploading of images |
| 10:32 | <a1> | I want to make to make it possible to allow users to upload and listen to sounds |
| 10:32 | <a1> | with greasemonkey |
| 10:32 | gsnedders | notes you'll hit issues with some browsers with null bytes in the data, and with stuff that isn't UTF-8 |
| 10:33 | jgraham | wonders if you could use some clever hack with <img> <canvas> and getImageData |
| 10:34 | <a1> | getImageData? |
| 10:35 | <a1> | That returns pixels, doesn't it? |
| 10:36 | <zcorpan> | yes |
| 11:16 | <zcorpan> | can we update http://www.w3.org/QA/2002/04/valid-dtd-list.html ? |
| 11:18 | <hsivonen> | zcorpan: maybe dom could if you can convince him. |
| 11:19 | <zcorpan> | and the referenced http://www.w3.org/QA/Tips/Doctype has factual errors |
| 11:30 | <zcorpan> | does firefox still look at content-style-type? |
| 11:33 | <karlcow> | zcorpan: for the qa tip it is easy to modify, there is a process |
| 11:33 | <zcorpan> | what's the process? |
| 11:33 | <karlcow> | for the dtd list it's easy to do. |
| 11:34 | <karlcow> | zcorpan: http://www.w3.org/QA/Tips/ |
| 11:35 | <karlcow> | if you want I can send some suggestions, I see indeed some factual errors |
| 11:36 | <karlcow> | Tools which process HTML documents, such as Web browsers, need to know which DTD an (X)HTML document |
| 11:36 | <karlcow> | s/such as Web browsers// |
| 11:43 | <zcorpan> | sent an email to dom |
| 11:47 | <karlcow> | zcorpan: hehe http://lists.w3.org/Archives/Public/public-evangelist/2009Dec/0000 |
| 11:48 | <zcorpan> | karlcow: thanks. my email was about the other document |
| 11:48 | <karlcow> | excellent |
| 11:52 | <zcorpan> | karlcow: i'd also suggest replacing the first further reading link with http://hsivonen.iki.fi/doctype/ |
| 11:55 | <karlcow> | http://www.alistapart.com/stories/doctype/ plus this one has went the way of the dodo. the one of hsivonen should be added too maybe a bit technical for certain people but good to have indeed. |
| 12:00 | <gsnedders> | karlcow: http://www.alistapart.com/articles/doctype/ I guess is it |
| 14:01 | <hsivonen> | the third Definition below says only the 5 XML ones |
| 14:02 | <hsivonen> | MikeSmith: so I suggest making a copy of NamedCharacters that only has 5 entries |
| 14:03 | <MikeSmith> | that'd certainly make things easier |
| 14:04 | <MikeSmith> | but are you sure that's what the third Definition is actually saying? |
| 14:04 | <MikeSmith> | I can't see that it's stating that restriction |
| 14:04 | <hsivonen> | zcorpan: ^ spec not clear enough :-) |
| 14:05 | <MikeSmith> | hsivonen: seems like there are two parts to what is says there |
| 14:05 | <MikeSmith> | "Each CharRef in PseudoAttValue is replaced with the character it represents according to XML. [XML]" |
| 14:05 | <MikeSmith> | which isn't stating any restriction |
| 14:06 | <MikeSmith> | and "Each PredefEntityRef in PseudoAttValue is replaced with with U+0026 (&) if it is "&", U+003C (<) if it is "<", U+003E (>) if it is ">", U+0022 (") if it is """ and U+0027 (') if it is "'"." |
| 14:06 | <hsivonen> | MikeSmith: CharRef is a numeric reference, isn't it? |
| 14:06 | <hsivonen> | and PredefEntityRef is a named ref |
| 14:06 | MikeSmith | looks at XML spec now |
| 14:07 | <MikeSmith> | hsivonen: yeah, OK, CharRef is numeric |
| 16:08 | <foolip> | is there even a validator for XHTML5+RDFa that includes the microdata attributes? |
| 16:09 | <erlehmann> | dunno lol :3 |
| 16:10 | <foolip> | I doubt we'll see one a validator.nu |
| 16:10 | <foolip> | at |
| 16:12 | <erlehmann> | Hmmm, if both is not possible at once, I've no idea how to continue. The Creative Commons person says RDFa is the way to go, Hixie wants Microdata … should I just make it an option in the interface? |
| 16:12 | <erlehmann> | like: ( ) RDFa (x) Microdata |
| 16:13 | <erlehmann> | Pro: Not my problem anymore. Con: Users will likely not understand anything at all. |
| 16:14 | <foolip> | I doubt any consumers care about validity and since the attributes don't clash they won't interfere with each other |
| 16:14 | <foolip> | but it seems a bit odd to support both in the same document |
| 16:14 | <foolip> | is there any benefit to supporting RDFa, like Google giving preferential treatment or something? |
| 16:15 | <erlehmann> | Anyway, nice Trilemma … Choose two: Microdata, RDFa, Valid Markup. :D |
| 16:15 | <foolip> | hehe |
| 16:16 | <erlehmann> | Well, there are already RDFa consumers out there, I assume. |
| 16:16 | <foolip> | I know which one I'd sacrifice, but then I'm kind of biased. |
| 16:17 | <erlehmann> | Hehe. |
| 16:18 | <foolip> | why not also stuff some microformats in there |
| 16:18 | <foolip> | at least that won't affect validity :) |
| 16:21 | <erlehmann> | =_= |
| 16:22 | <jgraham> | Maybe you could add the data as RDF/XML hidden inside commnts and as JSON blocks inside <script type="application/json"> while you're at it :) |
| 16:22 | <erlehmann> | Got it. I'll stay with Microformats for now and fix the styling. Is there some wiki page with a list of Microformat consumers ? |
| 16:23 | <foolip> | right, wasn't CC doing RDF/XML in comments? |
| 16:24 | <erlehmann> | well, since i link to the CC license deed … you can have microformats in the generated code and RDF in CC territory ;) |
| 16:24 | <jgraham> | foolip: Not sure. Trackback use(es|d) it I believe |
| 16:24 | <Philip`> | Anyone who wants to extract licensing information from the web will have to support whatever markup CC currently tells people to use |
| 16:25 | <Philip`> | so you might as well just use that, rather than adding complexity by requiring consumers support more types of markup |
| 16:25 | <MikeSmith> | Philip`: OK - thanks (about EBNF question) |
| 16:25 | jgraham | wonders how similar the set of all people who want to extract licesnisng information is to the empty set |
| 16:25 | <jgraham> | Do Google or Yahoo or Microsoft or someone read this data? |
| 16:26 | <Philip`> | jgraham: Well, I guess they're not disjoint sets so there is some similarity |
| 16:26 | <jgraham> | (and do people then make use of it when they read it?) |
| 16:26 | <Philip`> | *dissimilarity |
| 16:26 | <jgraham> | Philip`: :p |
| 16:26 | <erlehmann> | Dunno, Google or Yahoo at least have this data on their pages. |
| 16:26 | <erlehmann> | Damn, now I have to learn Git branching. |
| 16:26 | <Philip`> | I'm fairly sure some search engines can use it |
| 16:26 | <foolip> | I know I often search for a specific license on google images or flickr, perhaps some of that information came from scraping |
| 16:26 | <Philip`> | http://search.yahoo.com/web/advanced?ei=UTF-8 |
| 16:27 | <Philip`> | "Search only for Creative Commons licensed content" |
| 16:27 | <foolip> | I don't remember ever finding anything with google though, perhaps the feature doesn't exist |
| 16:28 | <jgraham> | foolip: I use it on flickr but that doesn't require scraping since flickr have access to their own db |
| 16:29 | <foolip> | I used to use CC:s search tool, but that's just a frontend for other things |
| 16:29 | Philip` | wonders how common it is for sites to scrape themselves |
| 16:29 | <TabAtkins> | That would be kinda weird. |
| 16:29 | <Philip`> | I suppose lots have generic search engines that basically do that |
| 16:30 | <TabAtkins> | But yeah, generic search engines would be the common use case. |
| 16:30 | <TabAtkins> | I suppose I do that? I use Google Custom Search on my company's site. |
| 16:30 | <jgraham> | TabAtkins: So you just confessed to weirdness? |
| 16:30 | <TabAtkins> | Yes. |
| 16:31 | <Philip`> | I was thinking more of ones that are self-hosted, like Ultraseek or (to some extent) the Google Search Appliance |
| 16:31 | <Philip`> | where they could technically get access to the private databases, but for practical purposes they probably just read data via the site's normal web interface |
| 16:31 | <foolip> | Philip`: does "scraping" with JavaScript count? |
| 16:33 | <foolip> | in that case any site using the Microdata DOM API (none yet I assume) would be scraping themselves |
| 16:34 | Philip` | doesn't have a sufficiently coherent point to be able to work out whether JS counts or not |
| 16:34 | <karlushi> | jgraham, I think you can imagine tools like tumblr, posterous or any blogging tools included in aggregator. |
| 16:35 | <karlushi> | parsing the content for the license and adding the credits in the reblogged page. |
| 16:36 | <karlushi> | another cool feature would be an authoring creating a blockquote with the right credits, authors, and/or license information |
| 16:36 | <karlushi> | s/authoring/authoring tool/ |
| 16:57 | <erlehmann> | foolip, Microdata DOM isn't implemented yet, is it? |
| 16:59 | <foolip> | erlehmann: not in any browser, no |
| 17:00 | <erlehmann> | well, one could fake it with javascript pretty easily. |
| 17:01 | <foolip> | yes, which is what I've been playing with |
| 20:46 | <a1> | Hello. |
| 20:46 | <a1> | Could you please have a look at this: |
| 20:46 | <a1> | http://no-info.no-ip.info:6224/sound/test.html |
| 20:47 | <a1> | It's an audio tag with data: URI as its src |
| 20:47 | <a1> | I'm using firefox, and play/pause/seek functions are not working untl the whole sound has finished playing |
| 20:47 | <a1> | Is this how it should be working? |
| 20:50 | <annevk> | nope |
| 20:51 | <a1> | Bug in firefox or in my web page? |
| 20:52 | <annevk> | if your code is correct it's a bug in Firefox |
| 20:52 | <annevk> | haven't looked at the code since my connection is crappy |
| 20:52 | <a1> | <html><head></head><body><audio src="data:audio/ogg;base64,ALL-DATA-HERE" controls /></body></html> |
| 20:54 | <annevk> | looks good to me |
| 20:54 | <annevk> | well |
| 20:55 | <annevk> | <audio> needs an explicit closing tag |
| 20:55 | <annevk> | in text/html documents |
| 20:57 | <a1> | Still same behavior |
| 21:04 | <annevk> | i'd file a bug then |
| 21:19 | <jgraham> | annevk: I don't really know why you think the question about contexts is rhetorical. It seems you might mean "obviously not" but clearly you can write portable code by just using the 2D context or by doing feature testing or... |
| 21:19 | <jgraham> | So if by "that is rhetorical, right?" you meant "yes" it wasn't very clear |
| 21:36 | <roc> | a1: works for me |
| 21:36 | <roc> | oh, I see, we don't get the correct duration |
| 21:37 | <roc> | the first time through |
| 21:37 | <a1> | and can |
| 21:37 | <a1> | 't seek |
| 21:37 | <roc> | right, because we only support seeking using HTTP |
| 21:38 | <a1> | 'We' firefox or 'We' html? |
| 21:38 | <a1> | I filed a firefox bug. |
| 21:38 | <roc> | We firefox |
| 21:41 | <roc> | the problem is that Ogg doesn't include the duration at the start of the file, so we have to seek to the end of the file to get it, and that requires a transport like HTTP that supports seeking. We'll need to add some code so that when the download finishes, if we've got everything in the media cache we look at the data at the end to get the duration |
| 21:42 | <a1> | But the whole thing is loaded when player appears. |
| 21:42 | <a1> | "controls" goes after "src=data:..." |
| 21:42 | <a1> | so shouldn't whole steam already be in memory? |
| 21:42 | <Vito`> | oh neat |
| 21:43 | <Vito`> | glad you sorted it out a1 |
| 21:43 | <a1> | Yeah, thanks |
| 21:43 | <a1> | apparently base64 was relatvely fast and some regexp I used to throw away data from picture was making firefox freeze |
| 22:06 | <annevk> | jgraham, okay... |
| 22:06 | <annevk> | jgraham, I was just going from if things work differently it's bad for interop |
| 23:14 | <abarth> | i'm really tired of the CORS/UM discussion on webapps |
| 23:15 | <abarth> | it doesn't seem to be going anywhere |
| 23:16 | <othermaciej> | abarth: did my suggestion that people only post if they have new information to add not work? |
| 23:16 | <abarth> | tyler and ian are still talking about x-frame-options |
| 23:18 | <abarth> | (i should stop complaining and just ignore the threads) |