for (Iterator f = type.getFacets().iterator(); f.hasNext();) {
XSDFacet facet = (XSDFacet) f.next();
//white space
if (facet instanceof XSDWhiteSpaceFacet) {
XSDWhiteSpaceFacet whitespace = (XSDWhiteSpaceFacet) facet;
if (whitespace.getValue() == XSDWhiteSpace.REPLACE_LITERAL) {
text = Whitespace.REPLACE.preparse(text);
}
if (whitespace.getValue() == XSDWhiteSpace.COLLAPSE_LITERAL) {
text = Whitespace.COLLAPSE.preparse(text);
}
if (whitespace.getValue() == XSDWhiteSpace.PRESERVE_LITERAL) {
//do nothing
}
}
}