Re: WD-xhtml2-20030506: <qst>ions and <ans>wers

Chris Moschini wrote:

<snip/>

> <qa>
>   <qst>.....?</qst>
>   <ans>
>   <qa>
>     <qst>Did...that?</qst>
>     <ans>....</ans>
>   </qa>
>   </ans>
> </qa>
> 
> I actually think this is an excellent model and would be a useful addition to the spec. Note that using the qa wrapper means you can have multiple questions with 1 answer if you like, or multiple answers to one question - both are valid cases and here, semantically valid. You could unfortunately end up with multiple of both, which a confused HTML'er may do - is it possible to specify in the DTD that it's 1+ of one but 1 of the other OR 1 of one and 1+ of the other?

Thinking about it, I'd personally prefer having a <qa> element 
containing one <qst> followed by zero or more <ans>, i.e. <!ELEMENT qa 
(qst,ans*)>.  Otherwise it strikes me as unnecessarily complicated.  As 
Lanny Heidbreder has pointed out, this would make it quite similiar to a 
definition list, except that <dt> is restricted to Inline content (<qst> 
and <ans> should really allow Flow, like <dd>).

> This would provide a lot of interesting opportunities for UAs, including easily "Googling" the answers to questions, and validating a document to find there's a question you haven't answered ("Error: qa element without at least 1 ans element").

I agree <qst>/<ans> could potentially be useful to software agents; e.g. 
for a more question-orientated search engine.  But I think a <qa> 
element should contain zero or more <ans> rather than one or more -- on 
the basis that there're some questions that really shouldn't be 
answered.  ;o)

Cheers,

Dave

Received on Friday, 25 July 2003 17:28:17 UTC