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 "Elena Litani (JIRA)" <xe...@xml.apache.org> on 2005/06/08 16:47:34 UTC

[jira] Created: (XERCESJ-1082) compare of XML Schema datatypes (Xerces/JAXP)

compare of XML Schema datatypes (Xerces/JAXP)
---------------------------------------------

         Key: XERCESJ-1082
         URL: http://issues.apache.org/jira/browse/XERCESJ-1082
     Project: Xerces2-J
        Type: Bug
  Components: XML Schema datatypes  
    Versions: 2.6.2    
    Reporter: Elena Litani


According to schema one should compare types that are in the same value space, therefore for example dateTime should not be comparable to date. 
However, looking at the latest Xerces code, in particular XMLGregorianCalendarImpl and AbstractDateTimeDV (compareDates method), I did not see any check for actual type of schema datatypes being compared. This means that in some cases, for example, dateTime and time values could compare equal even though these should be "indeterminate". Sandy Gao noticed that same happens for String/anyURI comparison as well.
There are could be other types affected.





-- 
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


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


[jira] Resolved: (XERCESJ-1082) compare of XML Schema datatypes (Xerces/JAXP)

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1082?page=all ]
     
Michael Glavassevich resolved XERCESJ-1082:
-------------------------------------------

    Resolution: Fixed

Hi Elena,

We are checking that two types have the same value space before checking if they're equal, however you won't find this code in the DVs.  The check is being performed outside of the equals methods. When processing identity constraints, enumerations and value constraints we need to check that values are comparable before calling equals.  This has been fixed for awhile for identity constraints and enumerations.  Just put a fix in CVS yesterday for fixed values.  That should cover all the cases now.

> compare of XML Schema datatypes (Xerces/JAXP)
> ---------------------------------------------
>
>          Key: XERCESJ-1082
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1082
>      Project: Xerces2-J
>         Type: Bug
>   Components: XML Schema datatypes
>     Versions: 2.6.2
>     Reporter: Elena Litani
>     Assignee: Michael Glavassevich

>
> According to schema one should compare types that are in the same value space, therefore for example dateTime should not be comparable to date. 
> However, looking at the latest Xerces code, in particular XMLGregorianCalendarImpl and AbstractDateTimeDV (compareDates method), I did not see any check for actual type of schema datatypes being compared. This means that in some cases, for example, dateTime and time values could compare equal even though these should be "indeterminate". Sandy Gao noticed that same happens for String/anyURI comparison as well.
> There are could be other types affected.

-- 
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


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


[jira] Assigned: (XERCESJ-1082) compare of XML Schema datatypes (Xerces/JAXP)

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1082?page=all ]

Michael Glavassevich reassigned XERCESJ-1082:
---------------------------------------------

    Assign To: Michael Glavassevich

> compare of XML Schema datatypes (Xerces/JAXP)
> ---------------------------------------------
>
>          Key: XERCESJ-1082
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1082
>      Project: Xerces2-J
>         Type: Bug
>   Components: XML Schema datatypes
>     Versions: 2.6.2
>     Reporter: Elena Litani
>     Assignee: Michael Glavassevich

>
> According to schema one should compare types that are in the same value space, therefore for example dateTime should not be comparable to date. 
> However, looking at the latest Xerces code, in particular XMLGregorianCalendarImpl and AbstractDateTimeDV (compareDates method), I did not see any check for actual type of schema datatypes being compared. This means that in some cases, for example, dateTime and time values could compare equal even though these should be "indeterminate". Sandy Gao noticed that same happens for String/anyURI comparison as well.
> There are could be other types affected.

-- 
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


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