André Malo wrote:
nope. I always put the example into <div class="example">. Your previous
version didn't validate, because you set up:


<div class="example"><code>
[ example content ]
</code></div>

Okay, I see what you mean. But I don't believe your choice works because you assume that <example> can only contain <pre>, <table>, or PCDATA. In fact, <example> can take anything. What if somebody did <example><p>txt</p></example>? Then you would wind up double-wrapping it in <p>.


How do we solve this problem? Well, one possibility is to eliminate the use of <code> entirely and use CSS to get that effect. But I would prefer not to do that because then non-css browsers would see the <example> in a proportional font. I suppose we could use some tricky XSLT to insert <code> only if the contents of <example> are bare text.
The other option would be to test in <example> for each possible block element. Yuck.


Joshua.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to