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 bu...@apache.org on 2002/10/11 20:05:12 UTC

DO NOT REPLY [Bug 13543] New: - IgnoreWhitespace does not work for schema validation

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=13543>.
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=13543

IgnoreWhitespace does not work for schema validation

           Summary: IgnoreWhitespace does not work for schema validation
           Product: Xerces2-J
           Version: 2.2.0
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: JAXP
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: fjd@cysive.com


Before parsing a valid xml document that contains a reference to a valid xsl 
schema, I set the IgnoringElementContentWhitespace feature to true on the 
DocumentBuilderFactory, but the resulting Document still contains the TEXT 
Nodes containing whitespace.  I was using jdk 1.4 and the latest 
xercesImpl.jar. This is the sample code:
DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
domFactory.setNamespaceAware(true);
domFactory.setValidating(true);
domFactory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
domFactory.setIgnoringComments(true);
domFactory.setIgnoringElementContentWhitespace(true);
builder = domFactory.newDocumentBuilder();
Document doc = builder.parse(xml);

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