W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2006

[whatwg] Dialogue and inline quotations

From: Michel Fortin <michel.fortin@michelf.com>
Date: Tue, 31 Oct 2006 08:34:33 -0500
Message-ID: <1C05EB68-10ED-4622-B75E-EBEE710BD40F@michelf.com>
I think if HTML5 deprecate the use of <dl> for dialog, that it ought  
to provide a an alternative syntax for them. I know it has already  
been discussed, but I'd suggest this:

     <dialog>
     <p><cite>Me:</cite> <q>Can I say something?</q>
     <p><cite>Him:</cite> <q>No!</q>
     </dialog>

In this design, <dialog> is optional, only needed when the dialog  
needs to be separated from the main text, <q> is optional when inside  
<dialog>, and <cite> can be omitted if the interlocutor name is not  
specified. This leaves much flexibility when writing dialogs, and  
thus allows the markup to be used for dialogs at places <dl> could not.

For instance, this is a dialog, but since its mixed with the main  
text you can't surround it by <dialog>. Also, using <cite> in here  
isn't very practical, as the text refers to the speakers as "he" or  
"she" most of the time.

     <p>He was downstair when he heard a strange noise from outside.  
When he
     went to see, he saw Julietta in the park screaming at him:  
<q>Where were
     you?</q></p>

     <p><q>I was busy fixing the pipes. What happened here?</q> he  
asked.</p>

     <p><q>There was a cat on the tree</q>, she said. <q>It jumped  
and landed
     in here.</q> She was pointing at a crate full of pieces of  
metal. <q>I
     jumped!</q></p>

It's interesting to note however that the same text could be  
surrounded by dialog tags when formatting the same dialog in French.  
In the following example, <q> must be styled with no marks and add em  
dashes must be added at the start of each paragraph in the dialog  
(this could be done by CSS, although here I've done it in the source  
for clarity):

     <p>Il ?tait au sous-sol quand il entendit un bruit ?trange  
venant de dehors.
     Quand il est alla voir ce qui se passait, il vit Julietta dans  
le park qui
     lui cria:</p>

     <dialog>
     <p>? <q>O? ?tais-tu ?</q></p>
     <p>? <q>J'?tait occup? ? r?parer les tuyaux. Qu'est-ce qui c'est  
pass?
     ici ?</q> a-t-il demand?.</p>
     <p>? <q>Il y avait un chat dans l'arbre</q>, dit-elle. <q>Il a  
saut?
     pour atterrir juste l?.</q>
     </dialog>

     <p>Elle pointant une caisse pleine de morceaux de m?tal.</p>

     <dialog>
     <p>? <q>Et j'ai fait le saut !</q></p>
     </dialog>

Note that without <q> in the previous example, there is no easy way  
to distinguish inserted text like "dit-elle" ("she said"), these are  
typically disambiguated from context in French. But I'd consider the  
<q> element optional anyway, even if omitting it leaves this  
ambiguity. The reason being that there is no way to disambiguate  
inserted text inside inline quotations either. What I did in the  
previous dialog requires the removal of the quote characters in the  
styling of <q>, but to be consistent you'd need to do that with  
inline quotations too, which goes against both the recommended usage  
and the default stylesheet for <q>:

     ? <q>Pourquoi se d?placer ?</q> dit-elle. <q>On a pas besoin de  
vous</q> ?

Personally, I think this is how <q> should have worked from the  
start, but it may be too late to change that. Anyway, let's return to  
the subject of dialogs.

The second type of dialog I considered is more like in a theatrical  
piece, where dialogs are completely free of any other prose. It was  
previously suggested in HTML4 to use <dl> for this:

     <p>Mary and Mark begin walking in the park.</p>

     <dl>
     <dt>Mary</dt>
     <dd>So where do you want to go tomorrow? I can tell you already
         have something in mind.</dd>
     <dt>Mark</dt>
     <dd>What makes you think that?</dd>
     </dl>

I think it'd be better expressed this way:

     <p>Mary and Mark begin walking in the park.</p>

     <dialog>
     <p><cite>Mary:</cite> So where do you want to go tomorrow? I can  
tell
        you already have something in mind.</p>
     <p><cite>Mark:</cite> What makes you think that?</p>
     </dialog>

Here, <q> tags would be optional because the dialog element already  
implies that everything in the paragraphs is part of the dialog. And  
since <q> adds quotes, which are not desired in this case, it'd  
probably be a bad idea to add it anyway.


Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/
Received on Tuesday, 31 October 2006 05:34:33 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:49 UTC