Friday, June 15, 2007, 10:49:47 AM, Philip Nye wrote:
> Daniel Dekany wrote:
>
>>> XHTML <div> may contain text (i.e. they have mixed
>>> content) and have no xml:space="preserve" attribute
>>
>> Maybe the root of the problem is on the CSS level. White-space between
>> block should be ignored, I think.
>
> The root of the problem is in the XHTML schema, not in CSS.
I meant, the text node that contains the whitespace is indeed there
(it is not ignored in the XML level), but the reason why it still not
shown in other applications is that text nodes containing only
white-space are not shown when they are between two *CSS* block. At
least it seems it works that way in Mozilla and IE. If they are
correct to do so, or it was just convenient for the users that way, I
don't know.
> Treatment of whitespace in mixed content when there is no other
> character data is frequently ambiguous (unless
> xml:space="preserve").
>
> Partly the difficulties you are describing comes from a desire to lay
> the XML out in a way which reads nicely for humans in its raw form.
>
> There is an inherent tension in XML between unambiguous representation
> and raw readability. This is not XXE's fault: it crops up wherever you
> try to read and edit raw XML - unless the schema has been carefully
> designed with this in mind.
Well, whose mistake it is isn't that interesting. The interesting
question is if what is annoying in practice and what is useful in
practice. So, you see, would you suggest that XHTML-s that contains
like:
<div>
<p>...</p>
<p>...</p>
</div>
are wrong and should be fixed be converting them to:
<div><p>...</p><p>...</p></div>
BTW, why is the below also working instead of the above in XXE?
<div>
<p>...</p><p>...</p>
</div>
There is whitespace before the </div> and after the <div>. Not like I
want them to be shown... I'm happy that they don't show, but I'm just
curious if the white-space between then p-s are not ignored, then
these why are?
--
Best regards,
Daniel Dekany