BeanWriterMetaInfoHolder metaInfHolder,
XmlSchema parentSchema) {
for (XmlSchemaFacet facet : facets) {
if (facet instanceof XmlSchemaPatternFacet) {
XmlSchemaPatternFacet pattern = (XmlSchemaPatternFacet) facet;
// some patterns contain \ so we have to replace them
String patternString = pattern.getValue().toString();
// replace backword slashes
patternString = patternString.replaceAll("\\\\", "\\\\\\\\");
patternString = patternString.replaceAll("\"", "\\\\\"");
if ((metaInfHolder.getPatternFacet() != null) &&
(metaInfHolder.getPatternFacet().trim().length() > 0)) {