XmlSchemaSimpleType fixedSimpleType = new XmlSchemaSimpleType(schema, true);
XmlSchemaSimpleTypeRestriction fixedRestriction = new XmlSchemaSimpleTypeRestriction();
fixedRestriction.setBaseTypeName(Constants.XSD_DECIMAL);
XmlSchemaTotalDigitsFacet fixedTotalDigits = new XmlSchemaTotalDigitsFacet();
fixedTotalDigits.setValue(digitsNode.toString());
XmlSchemaFractionDigitsFacet fixedFractionDigits = new XmlSchemaFractionDigitsFacet();
fixedFractionDigits.setValue(scaleNode.toString());
fixedFractionDigits.setFixed(true);
fixedRestriction.getFacets().add(fixedTotalDigits);
fixedRestriction.getFacets().add(fixedFractionDigits);
fixedSimpleType.setName(mapper.mapToQName(scopedName));
fixedSimpleType.setContent(fixedRestriction);