On Monday, January 14, 2002, at 12:41 AM, Incze Lajos wrote:
> On Sun, Jan 13, 2002 at 08:07:34PM +0000, robert burrell donkin wrote: >> a bit interesting, this one. i think that processing of whitespace is >> parser dependent... > > I think, no. White spaces are significant(*) in xml, so the parser can't > drop it. On the other hand whith SAX2 you can have (but not listed amongst > the sax2 core features) ignorable whites space filter, so a sax2 > filter can trim out the leading and ending white spaces for you and > maybe compact the other spaces to one space. If this filter would be > standrad then you could rely on it. However the whole status of SAX2 > whether it's a standard or not, is a good question. > > (*) unless you use the xml:space attribute) hi incze i've had a chance to read the SAX specs again. what you're saying is (i think) correct but not quite what i was thinking of. parsers can return whitespace either through the characters method or through the ignorableWhitespace method. digester only keeps characters received through the characters() method. so there might be a small difference in digester's behaviour with different parser - but probably not really enough to worry about. > My private opinion that for any other purpose than processing > "hierarchical object structures" using digester is a mistake. > Digester is very good at it, but the other solicitors of > requests like handling mixed content) should turn to another tool. i think that you might be right. - robert -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
