RE: EXTERNAL: Re: SAX Parser includes ignorable whitespaces in the character() method

2014-09-15 Thread Zhu, Joe
Michael, Thanks for your reply. The XSD does not allow mixed content. Attached is my test Java code, test xml and test xsd for your reference. Also included below is the run log for Xerces parser and for a Sun parser. When it runs with the Xerces parser, the whitespaces are reported in the cha

RE: EXTERNAL: Re: SAX Parser includes ignorable whitespaces in the character() method

2014-09-15 Thread Michael Glavassevich
ignorableWhitespace() was only defined for use with DTDs. Sun's implementation may be doing something for XSD but there's nothing in the specification which requires that. Xerces is behaving correctly. Michael Glavassevich XML Technologies and WAS Development IBM Toronto Lab E-mail: mrgla...@ca.

RE: EXTERNAL: Re: SAX Parser includes ignorable whitespaces in the character() method

2014-09-15 Thread Zhu, Joe
Hmm. Why does it distinguish between DTD and XSD? They are all schema definitions! It is useful to be able to distinguish between ignorable whitespaces and allowable whitespaces. Xerces can't, which makes it less useful . It also violates the W3C XML Recommendation, as shown below. Everywhere

RE: EXTERNAL: Re: SAX Parser includes ignorable whitespaces in the character() method

2014-09-15 Thread Michael Glavassevich
The specification you are quoting from is only concerned with DTDs. See the definition of validating XML processors here [1]. If XSD wanted something similar it would need to set the [element content whitespace] boolean property [2] to true on character information items, but there's nothing in