[jdom-interest] Stirring up Trouble

Elliotte Rusty Harold elharo at metalab.unc.edu
Wed Jul 19 16:43:42 PDT 2000

At 3:52 PM -0700 7/19/00, Jason Hunter wrote:

>> I was doing some work with XPointers today and noticed
>> that white space including pure white space nodes are significant in
>> XPointer as currently written. So that's just one more spec not
>> handling white space properly will prevent JDOM from implementing.
>Elliotte, I've told you this before in public and in private email.  We
>can fully support XPointers.  We don't remove the whitespace from the
>document (not sure the current implementation does the right thing
>there, but if not that's a bug).  That information is available (just
>call the method version that takes a boolean) so XPointer can of course
>be implemented.  The only thing being decided is whether the
>getContent() convenience method calls getContent(false) or

That's not what I'm talking about here. The question is not what 
getContent() does. It's what getMixedContent() does. Since 
getMixedContent() is stripping white space only nodes, you can't use 
it for any application, such as XPointer, that needs to see those 
white space only text nodes. Maybe I'm missing something but right 
now I don't see any method that will return the white space nodes in 
an element like this one

   <author>Jihn  Sith</title>

This novel element contains five children, three of which are white 
space only text nodes. XPointer needs to access all five children. I 
don't see how to do that using getMixedContent(), getContent() or any 
other method.

| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
|                  The XML Bible (IDG Books, 1999)                   |
|              http://metalab.unc.edu/xml/books/bible/               |
|   http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/   |
|  Read Cafe au Lait for Java News:  http://metalab.unc.edu/javafaq/ |
|  Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/     |

More information about the jdom-interest mailing list