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

List:       koffice-devel
Subject:    Re: Faster saving - new data
From:       David Faure <faure () kde ! org>
Date:       2004-04-16 23:05:45
Message-ID: 200404170105.46199.faure () kde ! org
[Download RAW message or body]

On Friday 16 April 2004 19:27, Thomas Zander wrote:
> Your example for reading got me thinking though...  My XML (wrt namspaces)
> is a little rusty, but won't this break if an xml writer chooses to not
> write "style:style" but instead uses the xmlns attribute?
> Since
> <foo:A xmlns:foo="http://www.foo.org/">
>      <foo:B>abcd</foo:B>
> </foo:A>
> 
> and
> 
> <A xmlns="http://www.foo.org/">
>      <B>abcd<B>
> </A>
> 
> are the same, your reading of "foo:B" fails in the second attempt, even
> while it actually is the same thing...

In terms of XML, it is the same thing indeed....

If we want to fix the QDom-based reading code to support this,
we'll have to use attributeNS and elementsByTagNameNS (hmm there
is no namedItemNS!), and pass the (rather long) namespace URI
every time.... this isn't going to make things faster.

Personally, I don't think anyone is going to create oasis documents that
way, it would break too many things in non-namespace-aware parsers.
(I wonder if all the XSLT stylesheets around OO are namespace-aware...).
Of course "never say never", etc. .... but I'm just not sure this is worth
the effort until we actually see someone doing this.

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
_______________________________________________
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