Class FractionDigitsFacet

All Implemented Interfaces:
DatabindableDatatype, XSDatatype, Serializable, org.relaxng.datatype.Datatype

public class FractionDigitsFacet extends DataTypeWithLexicalConstraintFacet
'fractionDigits' facet. this class holds these facet information and performs validation.
See Also:
  • Field Details

    • scale

      public final int scale
      maximum number of fraction digits
    • serialVersionUID

      private static final long serialVersionUID
      See Also:
  • Constructor Details

    • FractionDigitsFacet

      public FractionDigitsFacet(String nsUri, String typeName, XSDatatypeImpl baseType, int _scale, boolean _isFixed) throws org.relaxng.datatype.DatatypeException
      Throws:
      org.relaxng.datatype.DatatypeException
  • Method Details

    • checkLexicalConstraint

      protected boolean checkLexicalConstraint(String content)
      Specified by:
      checkLexicalConstraint in class DataTypeWithLexicalConstraintFacet
    • diagnoseByFacet

      protected void diagnoseByFacet(String content, org.relaxng.datatype.ValidationContext context) throws org.relaxng.datatype.DatatypeException
      Specified by:
      diagnoseByFacet in class DataTypeWithFacet
      Throws:
      org.relaxng.datatype.DatatypeException
    • countScale

      protected static final int countScale(String literal)
      count the number of fractional digits. this method can assume that the given literal is appropriate as an decimal value. "the number of fractional digits" is defined in http://www.w3.org/TR/xmlschema-2/#number