[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Interesting QDomDocument::setContent variant
From:       Nicolas Goutte <nicolasg () snafu ! de>
Date:       2004-06-08 13:23:29
Message-ID: 200406081523.29145.nicolasg () snafu ! de
[Download RAW message or body]



On Monday 07 June 2004 21:22, David Faure wrote:
> On Monday 07 June 2004 20:36, David Faure wrote:

I am sorry but I do not understand your problem.

> > > I doubt that; its hard work to create nicely indented XML files; my
> > > guess is that they were just lazy :)
> >
> > I disagree. It really makes the (computer-) parsing simpler.
>
> To confirm this: there's the other case where indenting complicates things.
>
>    <text:p text:style-name="P1"> <text:span
> text:style-name="T1">bold</text:span> <text:span text:style-name="T2">
> </text:span>
>     <text:span text:style-name="T3">italic</text:span>
>    </text:p>

Well, for me, it looks like you wants the white space.

The only one that you will not get (due to XML specification) is:
<text:p text:style-name="P1"> <text:span> text:style-name="T1">
and
</text:span>
</text:p>



>
> After activating the whitespace-reporting feature of QXmlSimpleReader, you
> get the space in the second span (as intended), but you also get newlines
> between the spans, and "\n   " in character data means a space (inside
> text:p we are in "whitespace collapse" mode, says the spec). So at least
> within text:p, there should be no indentation at all, since it introduces
> wrong spaces into the text.

H'm, I start to understand why Qt has introduced that behaviour, as it makes 
XML like HTML.

>
> If there is no indentation within text:p and indentation in the rest of the
> XML it will look rather strange, won't it?

That is what OO does however.

Have a nice day!

_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic