I assume that since I couldn't find a bunch of other people asking the
same question, I must be missing something or doing something wrong.
I'm trying to do something like the Sortable Tables demo in a Kid
template, but Kid complains with an "unbound prefix" exception wherever
I use mochi:format attributes, causing an internal server error.
What's the trick here?
You may be able to get away with putting something like this in your
template, though be aware it is a hack. That, and I don't even know if
it'd work.
<html xmlns:mochikit="http://thisisafakenamespace.org/">
Good luck.
Found it. Forgot to add mochi:format to the DTD attribute list.
For anyone else who runs into this, here's a comment from the top of
the Sortable Tables HTML:
Technically we should be using this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" [<!ATTLIST th
mochi:format CDATA #IMPLIED>]>
However, that will only work if the document is served with a
Content-Type of "application/xhtml+xml". Browsers don't parse the tag
right otherwise.
On 12/6/05, Brian Beck <exo...@gmail.com> wrote:
>
Not sure, but it didn't solve my problem anyway, since Kid ignores the
DTD you give it and puts in its own. Also tried the xlmns:mochi thing
you suggested, still can't get the template to render. Where can I
modify "sitetemplate" that master.kid extends from? If that has the
DTD and base html tag, then I think I can make it work.
Indeed. They don't because if you send XHTML with text/html, browsers think you
send them HTML and not XML.
http://www.hixie.ch/advocacy/xhtml
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
This is getting a bit more complicated than I think it should be...
even if I tell master.kid not to extend sitetemplate, Kid overrides its
DTD and html tag (where xlmns attributes are listed).
Hasn't anyone already used both MochiKit attributes and Kid at the same
time? How'd you do it?