[XML-SIG] Spec for marking book reviews on the Web

Andrew Kuchling akuchlin@mems-exchange.org
Tue, 14 Aug 2001 11:04:34 -0400

On Sun, Aug 12, 2001 at 11:26:56PM -0400, Andrew Kuchling wrote:
>I've just finished a first draft of a simple specification for marking
>book reviews on Web pages.

Thinking some more about my earlier book review posting and after some
comments from Eugene Kim, some tweaking of the declaration format
seems needed.  I've come up with 3 candidate approaches: everything in
one element, everything in element and attribute content, and elements
with text content, and would like to hear opinions about it.

(Aside: I'm posting this to the XML-SIG because it's really the only
list I've got.  Can someone point me toward a mailing list where
people hang out to design XML applications?  xml-dev seems more
concerned with higher-level questions such as "which schema language?
DTDs: threat or menace?" than with applications; comp.text.xml is full
of newbies asking questions.  Any suggestions, or should I continue to
use the XML-SIG?)

All of the possible formats would require a namespace declaration
for the 'review' namespace; one possibility is as follows:
    <html xmlns:review="http://www.amk.ca/books/review">

Format 1: one element with attributes.  

<p><cite>Amazing Title</cite>, Mark Twain and Dante Aligheri<br/>

<review:review isbn="1234" title="Amazing Title"
               author="Mark Twain, Dante Aligheri"
   Here is the text of my review.  <em>It can use HTML.</em>

Handling multiple authors is hard and likely to be unreliable.  (Split
the attribute value at the commas?  What if a book is written by
"George Gordon, Lord Byron", who is one person?)

Format 2: several elements with attributes.  

<p><cite>Amazing Title</cite>,
Mark Twain and Dante Aligheri
<review:review isbn="1234" title="Amazing Title"
   <review:author name="Mark Twain" />
   <review:author name="Dante Aligheri" />
   Here is the text of my review.  <em>It can use HTML.</em>

We could add additional attributes to authors later (an ID, date of
birth/death, &c).  And should names be "last, first" or "first last",
or two separate attributes?  I lean toward "first last"; two
attributes would be more verbose and less readable.  (Maybe as an

Format 3: use text content.  

<review:review isbn="1234" reviewer="http://www.amk.ca/books/">
   <cite><review:title>Amazing Title</review:title></cite>, 
                   <review:author>Mark Twain</review:author> and 
	           <review:author>Dante Aligheri</review:author>
   Here is the text of my review.  <em>It can use HTML.</em>

Old user agents should just display the text, and new XHTML-aware
agents could display the author and title specially.  Most verbose
form, though.  Users could put HTML in the title and author; I suspect
that's a bug and not a feature.  Also, note that the <cite> element
surrounding the title and the initial <br/> would have to be cleaned
up, because they aren't really part of the review text.

Does anyone have suggestions about which form would be preferable?  I
think I'm leaning toward #2 as the best trade-off of simplicity
and markup precision.