Re: Please don't shout or throw things at this respec newbie

Henry, Henry, Henry...

Have we ever thrown anything at you before?

On 03/06/2013 16:00 , Henry S. Thompson wrote:
> I prefer to edit my specs in XML.  I have a usable respec+XHTML source
> doc't, which previews correctly in browsers.  Or, rather, I thought I
> did.
>
> It works with specStatus="unofficial", but not with specStatus="ED".
> In the later case, it fails (Chrome, Opera) with "DOM Exception 12"
> (Chrome), "DOMException: SYNTAX_ERR

This is quite interesting. I don't recall ever seeing it before. Do you 
have a pointer to the document in question? It will likely be faster if 
I debug it myself.

I have a suspicion that this may be an XHTML problem. Is there any 
chance that you are not only editing your document as XHTML, but also 
serving it as application/xhtml+xml (or, which amounts to the same in 
some browsers, loading it from disk with a .xhtml extension)?

It's been a while since I've used XHTML in any form, but I have dim 
memories of innerHTML not working there. If that's the case, I'm afraid 
the only fix will be to switch to HTML (at least for the media type), 
because removing all uses of innerHTML would be a major undertaking.

> I'm using
>
>    http://www.w3.org/Tools/respec/respec-w3c-common
>
> which is, as is evident above, obfuscated, so debugging is,
> essentially, impossible.
>
> Is there a non-obfuscated version I could be using to get more useful
> insight into what's wrong?  Anyone recognise this problem?

Yes, but the non-obfuscated version only works if loaded from the same 
origin (which also means, not from a file: URL). To do that:

• clone https://github.com/darobin/respec/ somewhere under your HTTP 
root (or wherever you want so long as you serve it over HTTP)
• put your document on the same HTTP server
• have it link to require.js with the following syntax (lifted from 
examples/basic.html):

<script src='../js/require.js' data-main='../js/profile-w3c-common' 
async class='remove'></script>

Adjusting *both* paths as necessary.

But you're probably better off just giving me the link :) This is 
unlikely to be something wrong with how you set up your document other 
than its MIME type.

-- 
Robin Berjon - http://berjon.com/ - @robinberjon

Received on Monday, 3 June 2013 14:40:26 UTC