Class FractionDigitsFacet

    • Field Detail

      • scale

        public final int scale
        maximum number of fraction digits
    • Constructor Detail

      • FractionDigitsFacet

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

      • diagnoseByFacet

        protected void diagnoseByFacet​(java.lang.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​(java.lang.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