You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Kurt Riede (JIRA)" <xe...@xml.apache.org> on 2007/06/07 18:25:26 UTC
[jira] Closed: (XERCESJ-1071) getLexicalFacetValue returns wrong
total digits for integer validation
[ https://issues.apache.org/jira/browse/XERCESJ-1071?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kurt Riede closed XERCESJ-1071.
-------------------------------
The fix works for me, so I've closed this issue
> getLexicalFacetValue returns wrong total digits for integer validation
> ----------------------------------------------------------------------
>
> Key: XERCESJ-1071
> URL: https://issues.apache.org/jira/browse/XERCESJ-1071
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema API
> Affects 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.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org