[jdom-interest] Stirring up Trouble

Brett McLaughlin brett.mclaughlin at lutris.com
Wed Jul 19 17:27:52 PDT 2000


Elliotte Rusty Harold wrote:
> 
> 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.
> >
> >NOT TRUE!
> >
> >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
> >getContent(true).
> 
> 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
> 
> <novel>
>    <title>Fire</title>
>    <author>Jihn  Sith</title>
> </novel>
> 
> 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.

getMixedContent() would return that unless validation was on. I don't
see that as a problem, since the surrounding whitespace (between novel
and title, and between author and novel) is ignorarable (from XML 1.0)
with validation on.

Right?

-Brett

> 
> 
> +-----------------------+------------------------+-------------------+
> | 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/     |
> +----------------------------------+---------------------------------+
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com

-- 
Brett McLaughlin, Enhydra Strategist
Lutris Technologies, Inc. 
1200 Pacific Avenue, Suite 300 
Santa Cruz, CA 95060 USA 
http://www.lutris.com
http://www.enhydra.org



More information about the jdom-interest mailing list