logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

[jira] Commented: (XERCESJ-1071) getLexicalFacetValue returns wrong total d: msg#00028

Subject: [jira] Commented: (XERCESJ-1071) getLexicalFacetValue returns wrong total digits for integer validation
     [ 
http://issues.apache.org/jira/browse/XERCESJ-1071?page=comments#action_65192 ]
     
Kurt Riede commented on XERCESJ-1071:
-------------------------------------

Sorry, I've posted this twice.
This is a duplicate of issue XERCESJ-1079.

see http://issues.apache.org/jira/browse/XERCESJ-1079

> getLexicalFacetValue returns wrong total digits for integer validation
> ----------------------------------------------------------------------
>
>          Key: XERCESJ-1071
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1071
>      Project: Xerces2-J
>         Type: Bug
>   Components: XML Schema API
>     Versions: 2.6.2
>  Environment: Win2K, 
>     Reporter: Kurt Riede
>     Priority: Minor
>  Attachments: patch.txt
>
> If I call
>       getLexicalFacetValue(XSSimpleTypeDefinition.FACET_TOTALDIGITS)
> on the integer type and types derivated from integer, I always get "0".
> Getting the total digit facet via getFacets() returns undefined as expected. 
> It seems that in class XSSimpleTypeDecl in method getLexicalFacetValue, the 
> test for validationDV == DV_INTEGER was by mistake placed in the case 
> FACET_TOTALDIGITS instead of the case FACET_FRACTIONDIGITS.
> Index: XSSimpleTypeDecl.java
> ===================================================================
> RCS file: 
> /home/cvspublic/xml-xerces/java/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java,v
> retrieving revision 1.68
> diff -u -r1.68 XSSimpleTypeDecl.java
> --- XSSimpleTypeDecl.java     7 Apr 2005 17:37:07 -0000       1.68
> +++ XSSimpleTypeDecl.java     28 Apr 2005 07:17:31 -0000
> @@ -2067,10 +2067,10 @@
>               case FACET_MININCLUSIVE:
>                       return (fMinInclusive == 
> null)?null:fMinInclusive.toString();
>               case FACET_TOTALDIGITS:
> -                     if (fValidationDV == DV_INTEGER)
> -                             return "0";
>                       return (fTotalDigits == 
> -1)?null:Integer.toString(fTotalDigits);
>               case FACET_FRACTIONDIGITS:
> +            if (fValidationDV == DV_INTEGER)
> +                return "0";
>                       return (fFractionDigits == 
> -1)?null:Integer.toString(fFractionDigits);
>               }
>               return null;

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


<Prev in Thread] Current Thread [Next in Thread>