Re: "ignorable white space"

>DOM Level 3 calls for:
>
>     whitespace in element content (aka "ignorable
>     whitespace"). Does this Text node only contain
>     whitespace in element content?
>
>How will this be accomplished?  Will the Text class have
>an "ignorable()" method, or will the interface hierarchy
>change:

It is EXTREMELY unlikely that the interface hierarchy will change. Current
inclination is to have a pair of tests:
     Via the Text node: Does this contain only whitespace?
     Via the Element or the Element Declaration: Can this Element
          contain only other Elements.

Details beyond that are still in flux. We still don't have a formal
_internal_ working draft for Level 3, though we're working toward one.

>p.s. Can CDATA sections be located in "ignorable" areas?

Good question. I would say they shouldn't be, since the point of whitespace
in element content is just to allow "pretty-printing" (indenting and the
like), and if you're using a CDATA Section it's because you're trying to
make an explicit statement about document content. But we'd have to check
the XML 1.0 spec to be sure.

Received on Monday, 12 June 2000 09:30:57 UTC