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 sa...@ca.ibm.com on 2001/03/15 16:58:54 UTC

Patch - Bugs & Fixes in Schema Datatype

Hi all,

For the following data types, you can specify both attributes
"minInclusive" and "minExclusive", which is against the rules:
TimeDuration, RecurringDuration, Float, and Double.

For example, the following segment is treated as legal type definition:
<simpleType name="myFloat">
    <restriction base="float">
        <minInclusive value="900"/>
        <minExclusive value="100"/>
    </restriction>
</simpleType>

I looked at the code, and found out that "FACET_MINEXCLUSIVE" in these
files were wrongfully spelled as "FACET_MININCLUSIVE". The patch file is
attached, and the fixes are (package
org.apache.xerces.validators.datatype):

diff -w -r1.6 TimeDurationDatatypeValidator.java
169c169
<                     fFacetsDefined +=
DatatypeValidator.FACET_MININCLUSIVE;
---
>                     fFacetsDefined +=
DatatypeValidator.FACET_MINEXCLUSIVE;

diff -w -r1.8 RecurringDurationDatatypeValidator.java
171c171
<                     fFacetsDefined +=
DatatypeValidator.FACET_MININCLUSIVE;
---
>                     fFacetsDefined +=
DatatypeValidator.FACET_MINEXCLUSIVE;

diff -w -r1.13 FloatDatatypeValidator.java
157c157
<                     fFacetsDefined +=
DatatypeValidator.FACET_MININCLUSIVE;
---
>                     fFacetsDefined +=
DatatypeValidator.FACET_MINEXCLUSIVE;

diff -w -r1.12 DoubleDatatypeValidator.java
151c151
<                     fFacetsDefined +=
DatatypeValidator.FACET_MININCLUSIVE;
---
>                     fFacetsDefined +=
DatatypeValidator.FACET_MINEXCLUSIVE;

Cheers,
Sandy Gao
Software Developer, IBM Canada
(1-416) 448-3255
sandygao@ca.ibm.com

(See attached file: diff.txt)

Re: Patch - Bugs & Fixes in Schema Datatype

Posted by Elena Litani <hl...@jtcsv.com>.
Applied your patch to Float and Double datatypes. TimeDuration and
RecurringDuration are broken, and don't comply to CR vs of schema.

Thank you
Elena

sandygao@ca.ibm.com wrote:
> 
> Hi all,
> 
> For the following data types, you can specify both attributes
> "minInclusive" and "minExclusive", which is against the rules:
> TimeDuration, RecurringDuration, Float, and Double.
> 
> For example, the following segment is treated as legal type definition:
> <simpleType name="myFloat">
>     <restriction base="float">
>         <minInclusive value="900"/>
>         <minExclusive value="100"/>
>     </restriction>
> </simpleType>
> 
> I looked at the code, and found out that "FACET_MINEXCLUSIVE" in these
> files were wrongfully spelled as "FACET_MININCLUSIVE". The patch file is
> attached, and the fixes are (package
> org.apache.xerces.validators.datatype):
> 
> diff -w -r1.6 TimeDurationDatatypeValidator.java
> 169c169
> <                     fFacetsDefined +=
> DatatypeValidator.FACET_MININCLUSIVE;
> ---
> >                     fFacetsDefined +=
> DatatypeValidator.FACET_MINEXCLUSIVE;
> 
> diff -w -r1.8 RecurringDurationDatatypeValidator.java
> 171c171
> <                     fFacetsDefined +=
> DatatypeValidator.FACET_MININCLUSIVE;
> ---
> >                     fFacetsDefined +=
> DatatypeValidator.FACET_MINEXCLUSIVE;
> 
> diff -w -r1.13 FloatDatatypeValidator.java
> 157c157
> <                     fFacetsDefined +=
> DatatypeValidator.FACET_MININCLUSIVE;
> ---
> >                     fFacetsDefined +=
> DatatypeValidator.FACET_MINEXCLUSIVE;
> 
> diff -w -r1.12 DoubleDatatypeValidator.java
> 151c151
> <                     fFacetsDefined +=
> DatatypeValidator.FACET_MININCLUSIVE;
> ---
> >                     fFacetsDefined +=
> DatatypeValidator.FACET_MINEXCLUSIVE;
> 
> Cheers,
> Sandy Gao
> Software Developer, IBM Canada
> (1-416) 448-3255
> sandygao@ca.ibm.com
> 
> (See attached file: diff.txt)
> 
>   ------------------------------------------------------------------------
>                Name: diff.txt
>    diff.txt    Type: Plain Text (text/plain)
>            Encoding: base64
> 
>   ------------------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org