W3C home > Mailing lists > Public > www-html@w3.org > July 2003

Re: Custom elements in XHTML

From: Toby A Inkster <tobyink@goddamn.co.uk>
Date: Sun, 13 Jul 2003 18:46:52 +0100
To: Barry Broom <bpbrooe@barrybroom.co.uk>
Cc: www-html@w3.org
Message-ID: <20030713174652.GB26153@ophelia.goddamn.co.uk>
On Fri, Jul 11, 2003 at 10:44:47AM +0100, Barry Broom wrote:
| When using XHTML and CSS, I find myself creating a lot of classes in DIV
| and SPAN elements, such as;
| <span class="xhtmlCode">.</span>

I would suggest the following is more appropriate:

	<code class="xhtml">...</code>
  
| Now with XHTML being _extensible_ I would have thought I could make my
| own element such as;
| <xhtmlcode>.</xhtmlcode>
|  
| Then style it with CSS. This would be much easier to read, but in my
| research, it doesn't seem possible.

It is possible, but the result would not be valid XHTML (it would 
however be well-formed XML, and should thus be interpreted sensibly by 
most existing XML user agents).

What XHTML does is make it easy(-ish) to define your own custom XML 
document languages, for example, you could create BarryML -- which would 
be the same as XHTML but with an <xhtmlcode> element.

Documents in BarryML would not be valid XHTML, but would be valid 
BarryML and valid XML and should be understood by any XML browsers.

-- 
Toby A Inkster BSc (Hons) ARCS | mailto:tobyink@goddamn.co.uk | pgp:0x6A2A7D39
    aim:inka80 | icq:6622880 | yahoo:tobyink | jabber:tai@jabber.linux.it
            http://www.goddamn.co.uk/tobyink/ | "You've got spam!"
                             playing://(nothing)

Received on Sunday, 13 July 2003 13:46:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:56 GMT