- From: Dan Connolly <connolly@w3.org>
- Date: Fri, 11 Feb 2000 19:07:53 -0600
- To: Michael Blow <michael.blow@propel.com>
- CC: "'www-html@w3.org'" <www-html@w3.org>
Michael Blow wrote: > > Are there any W3C recommendations on how to name a custom tag? We need to > define a few custom tags, and want to following any naming standards that > may be in place, to minimize potential conflict. Take a look at this example from the XHTML spec: ========== http://www.w3.org/TR/2000/REC-xhtml1-20000126/#docconf The following example shows the way in which XHTML 1.0 could be used in conjunction with the MathML Recommendation: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>A Math Example</title> </head> <body> <p>The following is MathML markup:</p> <math xmlns="http://www.w3.org/1998/Math/MathML"> <apply> <log/> <logbase> <cn> 3 </cn> </logbase> <ci> x </ci> </apply> </math> </body> </html> ========== So the idea is -- document your extended vocabulary in the web, say, at http://www.propel.com/2000/catalog-markup (consider using XML Schemas for this http://www.w3.org/TR/xmlschema-1 ) -- xml-ize your HTML (include all the end tags, make emtpy tags explicit ala <br class="x"/> or <br /> in stead of <br/> etc. see the guidelines at http://www.w3.org/TR/2000/REC-xhtml1-20000126/#guidelines for details and http://www.w3.org/People/Raggett/tidy/ for a tool that can do a lot of the work automatically) -- use XML namespaces to associate your markup with your vocabulary documentation Putting it all together, you get something like: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fruit="http://www.propel.com/2000/catalog-markup"> <head> <title>An extended web page</title> </head> <body> <div catalog:sku="234234232"><h2>4" Widgets</h2> <p>now available for only <catalog:price denom="USD">4.95</catalog:price>!</p> </div> </body> </html> -- Dan Connolly http://www.w3.org/People/Connolly/
Received on Friday, 11 February 2000 20:11:58 UTC