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 "Enrique Pérez (JIRA)" <xe...@xml.apache.org> on 2007/12/12 08:39:43 UTC

[jira] Created: (XERCESJ-1286) Problem validating xsd:gYear and similar date types

Problem validating xsd:gYear and similar date types
---------------------------------------------------

                 Key: XERCESJ-1286
                 URL: https://issues.apache.org/jira/browse/XERCESJ-1286
             Project: Xerces2-J
          Issue Type: Bug
          Components: XML Schema Datatypes
    Affects Versions: 2.0.0 [alpha], 2.0.0 [beta], 2.0.0 [beta 2], 2.0.0 [beta 3], 2.0.0 [beta 4], 2.0.0, 2.0.1, 2.0.2, 2.1.0, 2.2.0, 2.2.1, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.6.1, 2.6.2, 2.7.0, 2.7.1, 2.8.0, 2.8.1, 2.9.0, 2.9.1
            Reporter: Enrique Pérez


We're using Xerces SAXParser for validating XML documents and detect possible errors in the documents. One of the documents that we try to validate has an element that is defined in the schema as "xsd:gYear". If we put a value with two digits (for example "07") in this element we should get an validation error as gYear requires a four digits year ("2007"), but the parse() method ends without reporting any warning or error. If I validate the same document with Altova XMLSpy I get the validation error. I think that the Xercers SAXParser should detect it too. I looked at the source code for the year type in Xerces (YearDV.java) and when it's created the string value is stored in a DateTimeData object without validating the length of the string representing the year. I suppose that may be similar problems validating other date and time types.



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


[jira] Assigned: (XERCESJ-1286) Problem validating xsd:gYear and similar date types

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich reassigned XERCESJ-1286:
---------------------------------------------

    Assignee: Michael Glavassevich

> Problem validating xsd:gYear and similar date types
> ---------------------------------------------------
>
>                 Key: XERCESJ-1286
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1286
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema Datatypes
>    Affects Versions: 2.9.1
>            Reporter: Enrique Pérez
>            Assignee: Michael Glavassevich
>
> We're using Xerces SAXParser for validating XML documents and detect possible errors in the documents. One of the documents that we try to validate has an element that is defined in the schema as "xsd:gYear". If we put a value with two digits (for example "07") in this element we should get an validation error as gYear requires a four digits year ("2007"), but the parse() method ends without reporting any warning or error. If I validate the same document with Altova XMLSpy I get the validation error. I think that the Xercers SAXParser should detect it too. I looked at the source code for the year type in Xerces (YearDV.java) and when it's created the string value is stored in a DateTimeData object without validating the length of the string representing the year. I suppose that may be similar problems validating other date and time types.

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


[jira] Updated: (XERCESJ-1286) Schema validator allows values of xs:gYear to contain less than 4 digits

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich updated XERCESJ-1286:
------------------------------------------

    Fix Version/s: 2.10.0

> Schema validator allows values of xs:gYear to contain less than 4 digits
> ------------------------------------------------------------------------
>
>                 Key: XERCESJ-1286
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1286
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema 1.0 Datatypes
>    Affects Versions: 2.9.1
>            Reporter: Enrique Pérez
>            Assignee: Michael Glavassevich
>            Priority: Minor
>             Fix For: 2.10.0
>
>
> We're using Xerces SAXParser for validating XML documents and detect possible errors in the documents. One of the documents that we try to validate has an element that is defined in the schema as "xsd:gYear". If we put a value with two digits (for example "07") in this element we should get an validation error as gYear requires a four digits year ("2007"), but the parse() method ends without reporting any warning or error. If I validate the same document with Altova XMLSpy I get the validation error. I think that the Xercers SAXParser should detect it too. I looked at the source code for the year type in Xerces (YearDV.java) and when it's created the string value is stored in a DateTimeData object without validating the length of the string representing the year. I suppose that may be similar problems validating other date and time types.

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


[jira] Commented: (XERCESJ-1286) Problem validating xsd:gYear and similar date types

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550958 ] 

Michael Glavassevich commented on XERCESJ-1286:
-----------------------------------------------

Actually this is only an issue for gYear.  The DVs for the other date/time types check that the length of the year is at least four digits.

> Problem validating xsd:gYear and similar date types
> ---------------------------------------------------
>
>                 Key: XERCESJ-1286
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1286
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema Datatypes
>    Affects Versions: 2.9.1
>            Reporter: Enrique Pérez
>            Assignee: Michael Glavassevich
>
> We're using Xerces SAXParser for validating XML documents and detect possible errors in the documents. One of the documents that we try to validate has an element that is defined in the schema as "xsd:gYear". If we put a value with two digits (for example "07") in this element we should get an validation error as gYear requires a four digits year ("2007"), but the parse() method ends without reporting any warning or error. If I validate the same document with Altova XMLSpy I get the validation error. I think that the Xercers SAXParser should detect it too. I looked at the source code for the year type in Xerces (YearDV.java) and when it's created the string value is stored in a DateTimeData object without validating the length of the string representing the year. I suppose that may be similar problems validating other date and time types.

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


[jira] Resolved: (XERCESJ-1286) Schema validator allows values of xs:gYear to contain less than 4 digits

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich resolved XERCESJ-1286.
-------------------------------------------

    Resolution: Fixed

I've committed a fix to SVN. Thanks for reporting.

> Schema validator allows values of xs:gYear to contain less than 4 digits
> ------------------------------------------------------------------------
>
>                 Key: XERCESJ-1286
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1286
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema Datatypes
>    Affects Versions: 2.9.1
>            Reporter: Enrique Pérez
>            Assignee: Michael Glavassevich
>            Priority: Minor
>
> We're using Xerces SAXParser for validating XML documents and detect possible errors in the documents. One of the documents that we try to validate has an element that is defined in the schema as "xsd:gYear". If we put a value with two digits (for example "07") in this element we should get an validation error as gYear requires a four digits year ("2007"), but the parse() method ends without reporting any warning or error. If I validate the same document with Altova XMLSpy I get the validation error. I think that the Xercers SAXParser should detect it too. I looked at the source code for the year type in Xerces (YearDV.java) and when it's created the string value is stored in a DateTimeData object without validating the length of the string representing the year. I suppose that may be similar problems validating other date and time types.

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


[jira] Updated: (XERCESJ-1286) Problem validating xsd:gYear and similar date types

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich updated XERCESJ-1286:
------------------------------------------

    Affects Version/s:     (was: 2.0.0 [alpha])
                           (was: 2.0.0 [beta])
                           (was: 2.0.0 [beta 2])
                           (was: 2.0.0 [beta 3])
                           (was: 2.0.0 [beta 4])
                           (was: 2.0.0)
                           (was: 2.0.1)
                           (was: 2.0.2)
                           (was: 2.1.0)
                           (was: 2.2.0)
                           (was: 2.2.1)
                           (was: 2.3.0)
                           (was: 2.4.0)
                           (was: 2.5.0)
                           (was: 2.6.0)
                           (was: 2.6.1)
                           (was: 2.6.2)
                           (was: 2.7.0)
                           (was: 2.7.1)
                           (was: 2.8.0)
                           (was: 2.8.1)
                           (was: 2.9.0)

> Problem validating xsd:gYear and similar date types
> ---------------------------------------------------
>
>                 Key: XERCESJ-1286
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1286
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema Datatypes
>    Affects Versions: 2.9.1
>            Reporter: Enrique Pérez
>
> We're using Xerces SAXParser for validating XML documents and detect possible errors in the documents. One of the documents that we try to validate has an element that is defined in the schema as "xsd:gYear". If we put a value with two digits (for example "07") in this element we should get an validation error as gYear requires a four digits year ("2007"), but the parse() method ends without reporting any warning or error. If I validate the same document with Altova XMLSpy I get the validation error. I think that the Xercers SAXParser should detect it too. I looked at the source code for the year type in Xerces (YearDV.java) and when it's created the string value is stored in a DateTimeData object without validating the length of the string representing the year. I suppose that may be similar problems validating other date and time types.

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


[jira] Updated: (XERCESJ-1286) Schema validator allows values of xs:gYear to contain less than 4 digits

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich updated XERCESJ-1286:
------------------------------------------

    Priority: Minor  (was: Major)
     Summary: Schema validator allows values of xs:gYear to contain less than 4 digits  (was: Problem validating xsd:gYear and similar date types)

> Schema validator allows values of xs:gYear to contain less than 4 digits
> ------------------------------------------------------------------------
>
>                 Key: XERCESJ-1286
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1286
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema Datatypes
>    Affects Versions: 2.9.1
>            Reporter: Enrique Pérez
>            Assignee: Michael Glavassevich
>            Priority: Minor
>
> We're using Xerces SAXParser for validating XML documents and detect possible errors in the documents. One of the documents that we try to validate has an element that is defined in the schema as "xsd:gYear". If we put a value with two digits (for example "07") in this element we should get an validation error as gYear requires a four digits year ("2007"), but the parse() method ends without reporting any warning or error. If I validate the same document with Altova XMLSpy I get the validation error. I think that the Xercers SAXParser should detect it too. I looked at the source code for the year type in Xerces (YearDV.java) and when it's created the string value is stored in a DateTimeData object without validating the length of the string representing the year. I suppose that may be similar problems validating other date and time types.

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