for (Iterator itr = facets.iterator(); itr.hasNext();) {
XSDFacet facet = (XSDFacet) itr.next();
if ("whiteSpace".equals(facet.getFacetName())) {
Whitespace whitespace = Whitespace.valueOf(facet.getLexicalValue());
if (whitespace != null) {
value = whitespace.preparse(value);
}
//else TODO: check for validation, throw exception?
}