- From: Maciej Stachowiak <mjs@apple.com>
- Date: Sat, 25 Mar 2006 16:21:51 -0800
- To: Maciej Stachowiak <mjs@apple.com>
- Cc: "Web APIs WG (public)" <public-webapi@w3.org>
- Message-Id: <20773840-3DE2-4C13-8FA2-E1BBFDD3B4C8@apple.com>
On Mar 25, 2006, at 1:19 AM, Maciej Stachowiak wrote: > > Hi everyone (and especially Robin), > > I made a few changes locally to ReSpec that I think are > improvements, and I'd like the ok to check them in. > > Here's what I did: > > * Implemented <termdfn> and <term> elements, to generate properly > styled definitions of terms in prose, and to allow uses of a > defined term to link to its point of definition. * Anne convinced me this was lame, so I did something slightly different. Instead of having to write this: A <termdfn xml:id="dfn-flux-capacitor">flux capacitor</termdfn> is the part of user agents with the highest flux impedance. When the engines are damaged, user agents MUST calibrate the <term ref="dfn-flux-capacitor>flux capacitor</term>. I just reused the dfn element for termdfn, and made the XSLT stylesheet automatically generate ids and hrefs based on text contents of <dfn> and <term> elements, like so: A <dfn>flux capacitor</dfn> is the part of user agents with the highest flux impedance. When the engines are damaged, user agents MUST calibrate the <term>flux capacitor</term>. This generates html that looks like this: A <dfn id="dfn-flux-capacitor">flux capacitor</dfn> is the part of user agents with the highest flux impedance. When the engines are damaged, user agents MUST calibrate the <a class="term" href="#dfn-flux-capacitor">flux capacitor</a>. * I also added a style on the <code> element to make it match normal text in size, since most browsers default to a 16-point default font, but a 13-point monospace font. (The only exception I could find is Opera, this makes <code> spans look too big, I am not sure how to address this in a cross-browser way. Any CSS wizards want to help?) Someone (best of all Robin) please sanity check my XSLT / XPath hackery:
This still includes the other two changes I made: > * Made xml:id get copied only as id and not as both xml:id and id > to passed-through xhtml elements. This is more consistent with > generated xhtml elements, less likely to cause validation issues, > and the only right thing in case of html output. > > * Changed copyright and registered trademark symbols to use numeric > entities instead of being included as raw unicode to avoid running > into charset issues. Regards, Maciej
Attachments
- text/plain attachment: better-tweaks.patch.txt
Received on Sunday, 26 March 2006 00:22:09 UTC