[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice
Subject: Re: How does a filter include special characters in QDom text?
From: David Faure <david () mandrakesoft ! com>
Date: 2000-06-24 13:04:35
[Download RAW message or body]
I suggest sending a mail to Torben <weis@kde.org> since he wrote
all those classes ;-)
On Sat, Jun 24, 2000 at 10:50:37AM +0100, Shaheed Haque wrote:
> Strange. I think that there may be some inconsistency here between the
> various components. Here is what I can see:
>
> qdom.cpp
> --------
>
> encodeAttr() recognises '<', '"' and '&', but not any of the others - though
> for all I know, that may be a part of the XML rules.
>
> encodeEntity() recognises '%', '"' and "&#", but not any of the others.
> Again, this may be the XML spec for all I know.
>
> qxml.cpp
> --------
>
> replaceEntities() recognises '&', '<', '>', '"', '\'' and "&#"
>
> parse() recognises '&', '<', '>', '"', '\'', "&#" and "&#x"
>
> koml.cc
> -------
>
> encode() recognises '<' and '>'.
>
> Note that I'm not conversant with the assumptions that XML allows the code
> to make, so not all the differences might be significant). I also have
> missed out non-simple entities inthe above list (since I don't know what
> they are!).
>
> The other clue in all this is that kword's .kwd documents do in fact contain
> '&' without any expansion to "&" in text (even though '<' and '>'are
> expanded). My concern is that I cannot tell if this is correct
> behaviour...can anyone clarify this?
>
>
> >From: Simon Hausmann <shaus@neuro2.med.uni-magdeburg.de>
> >Reply-To: koffice@master.kde.org
> >To: koffice@master.kde.org
> >Subject: Re: How does a filter include special characters in QDom text?
> >Date: Sat, 24 Jun 2000 01:15:58 +0200 (MET DST)
> >
> >
> >
> >On Fri, 23 Jun 2000, Shaheed Haque wrote:
> >
> > > I'm having trouble with importing special characters such as "&" using
> >the
> > > MSWord filter, with QDom complaining about parsing errors.
> > >
> > > After looking through the QDom/QXML code, I think I have to replace as
> > > follows:
> > >
> > > '<' -> "<"
> > > '>' -> ">";
> > > '"' -> """
> > > '&' -> "&"
> > > '\'' -> "'"
> > >
> > > Questions:
> > >
> > > 1. Is this correct (and is the list complete)?
> >
> >Yes
> >
> > > 2. It seems that QXMLParser does not bother to replace the expanded form
> > > with the required character - what am I doing wrong?
> >
> >Hmm, I think it does. But it might be a bug in the KOML parser, which is
> >used for parsing the xml for kword, instead of the QSAX parser...
> >
> >Bye,
> > Simon
> >
>
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
--
David FAURE, david@mandrakesoft.com, faure@kde.org
http://home.clara.net/faure/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today
See http://www.kde.org/kde1-and-kde2.html for how to set up KDE 2
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic