DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26506>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26506 ignorableWhitespace is broken for XML schemas [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Additional Comments From [EMAIL PROTECTED] 2004-02-02 16:03 ------- Good intention; bad argument! (Sorry. :p) Xerces didn't invent SAX API or XML Schema spec. It implements them, so it has to respect what's defined there. - SAX is very clear that ignorableWhitespace is only called for "element- content-whitespace"s, which is defined in the context of DTD. - The result of schema validation is Post-Schema-Validation Infoset (PSVI). Schema processors augment the baes Infoset by adding new properties to element and attribute information items. Not character information items! (Schema won't change whether a character is element-content-whispace.) So, schema processors are not allowed to call ignorableWhitespace for schema element-only whitespaces (unless SAX changes its mind). Having said that, I do agree that, sometimes, it's useful to know which whitespaces can be ignored after schema validation. SAX ignorableWhitespace doesn't help you here, but there is another way. Xerces provides access to PSVI, which will tell you whether the type of an element is a complex type with element-only content. Such information is availble on the startElement call. You can check for it, and ignore certain "characters" calls based on it. (You may need a stack of booleans. Other than that, there is nothing tricky.) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
