You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Jim Puccio <ch...@earthlink.net> on 2000/10/24 04:17:20 UTC

A whitespace question

I have a schema that has a few places in it where it needs to be escaped so
that user-defined containers (that can't be prediced by the schema) can be
inserted.  To deal with this, I have been using

<xsd:any processContents = "lax"/>

This is fine, in that it gets past the undefined container type, and resumes
normally inside processing other elements from my schema.  Now, these
documents are entirely composed of "elementOnly" stuff, so I've got the
feature

http://apache.org/xml/features/dom/include-ignorable-whitespace

set to false.  Again, everything is just dandy, except when we are inside
one of these escaped container nodes.  Grubbing around in the Xerces code,
I've found the statement that the parser can't tell what whitespace is
ignorable without a schema, which is obviously why in these contexts, I'm
getting all these noise text nodes generated.  But in my case, I *know* that
whitespace text nodes are *always* ignorable.  I would like to know if there
is some way that I can force whitespace processing to behave as though all
whitespace were ignorable, regardless of whether it is inside a node that
has a description in the schema or not.

What should I hack?  How do I hack it?

Thanks,

-- Jim Puccio