You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Rob Outar <ro...@ideorlando.org> on 2002/12/12 22:53:34 UTC

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

The feature states the following:

The only way that the parser can determine if text is ignorable is by
reading the associated grammar and having a content model for the document.
When ignorable white space text nodes are included in the DOM tree, they
will be flagged as ignorable. The ignorable flag can be queried by calling
the TextImpl#isIgnorableWhitespace():boolean method. This feature is
relevant only when the grammar is DTD.

My question is what does the parser consider ingnorableWhitespace?  My
question is prompted by the following:

Consider:

<keys>
	<key name = "foo">Blah</key>
	<key -------/>
<keys>

The parser is telling me that keys has 5 children, it looks like to be that
keys has 2 children.

Let me know.

Thanks,

Rob



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: Question on Feature: http://apache.org/xml/features/dom/include-ignorable-whitespace

Posted by Joseph Kesselman <ke...@us.ibm.com>.
Ignorable whitespace is whitespace contained within an element which has 
been validated against a DTD or schema model which says that element will 
contain only other elements.

If you haven't provided that declaration, and haven't parsed in validating 
mode, XML is *required* to consider all whitespace potentially meaningful, 
and it's up to your application to skip over it if it's irrelevant.

______________________________________
Joe Kesselman  / IBM Research


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org