Wednesday, June 13, 2007, 10:01:07 AM, Hussein Shafie wrote:

> Not an issue.

Whatever the technical background is, saying this comes through as
arrogance to the users, since (almost?) nothing but XXE renders it
like that. So the fact is that it is an issue in practice.

> 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.

> ==> XXE may do whatever it wants with the whitespace contained in
> such elements.

Surely nobody can sue you even if you display pink hippos instead of
those white-space, it's your basic freedom right... but you still
shouldn't do that.

> Daniel Dekany wrote:
>> Here is the problematic example (from the attached
>> ws-between-blocks-test-fails.html):
>> 
>>   ...
>>   <body>
>>     <div>
>>       <p>Para 1</p>
>>       <p>Para 2</p>
>>       <p>Para 3</p>
>>     </div>
>>   </body>
>>   ...
>> 
>> At least with the default XHTML CSS, between each p element a text
>> node will be displayed that contains a space (visually a space). But
>> of course the page should look the same as without that div (the
>> attached ws-between-blocks-test-ok.html), or as with the div but
>> without the whitespaces between the the p-s:
>> 
>>   ...
>>   <body>
>>     <div>
>>       <p>Para 1</p><p>Para 2</p><p>Para 3</p>
>>     </div>
>>   </body>
>>   ...
>> 
>> If I create and modify the XML document exclusively with XXE, this
>> problem doesn't arise, as when I put that tree of p-s into a div, XXE
>> converts it to this lastly shown form (i.e. not linebreak between
>> p-s). But if the XML was not created exclusively with XXE... And it's
>> indeed an important point of XML, that you can use various tools to
>> deal with it.
>> 
>> I guess that this in principle is a CSS implementation problem, i.e.
>> whitespace between *CSS* blocks shouldn't have visual effect. However,
>> maybe for this thing to work correctly in XXE, it's rather that XXE
>> should know if whitespace between which *elements* are irrelevant
>> according the XML schema defined meaning of the elements. So the
>> white-spaces just wouldn't reach the CSS implementation, they would be
>> deleted right when XXE loads the XML.
>> 
>> So, what's about this kind of issue? It's really a problem with
>> schemas that allow "mixed content" inside certain block elements.
>> XHTML is a prime example of a such schema, because putting parts of a
>> document inside div-s that has an id (or class) is a quite common
>> practice. And unless you have added the div with XXE, you get a quite
>> messy view if you open it with XXE.
>> 
>> 
>> 
>> ------------------------------------------------------------------------
>> 
>> Para 1
>> 
>> Para 2
>> 
>> Para 3
>> 
>> 
>> ------------------------------------------------------------------------
>> 
>> Para 1
>> 
>> Para 2
>> 
>> Para 3
>> 
>> 
>> ------------------------------------------------------------------------
>> 


-- 
Best regards,
 Daniel Dekany


Reply via email to