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 "Gerhard Kozuschek (JIRA)" <xe...@xml.apache.org> on 2009/06/16 19:07:07 UTC
[jira] Created: (XERCESJ-1379) Validating throws exception on
correct xs:datetime values representing a leap second
Validating throws exception on correct xs:datetime values representing a leap second
------------------------------------------------------------------------------------
Key: XERCESJ-1379
URL: https://issues.apache.org/jira/browse/XERCESJ-1379
Project: Xerces2-J
Issue Type: Bug
Components: JAXP (javax.xml.validation)
Affects Versions: 2.9.1
Environment: Java-SE-6u13 and u14
Reporter: Gerhard Kozuschek
W3C and ISO-8601 explicitely names and allows the value 60 for seconds, when the datetime defines a leap second.
Xerces' "org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.validateDateTime(DateTimeData data)" rejects such datetime values.
My test XML schema is:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified" attributeFormDefault="unqualified">
<xs:element name="leapSecond" type="xs:dateTime"/>
</xs:schema>
My test XML document is:
<?xml version="1.0" encoding="UTF-8"?>
<leapSecond xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="usingLeapSecond.xsd"
>2008-12-31T23:59:60.000000Z</leapSecond>
Variants ending with "...59:60Z" or "...59:60.000Z" are also rejected.
"DocumentTracer.java" prints:
MS-WiXP>java -jar DocumentTracer.jar -v -s -f ..\src\sample_60.000000Z.xml
setDocumentLocator(locator=org.apache.xerces.parsers.AbstractSAXParser$LocatorProxy@19efb05)
startDocument()
startPrefixMapping(prefix="xsi",uri="http://www.w3.org/2001/XMLSchema-instance")
startElement(uri="",localName="leapSecond",qname="leapSecond",attributes={{uri="http://www.w3.org/2001/XMLSchema-instance",localName="noNamespaceSchemaLocation",qname="xsi:noNamespaceSchemaLocation", type="CDATA",value="usingLeapSecond.xsd"}}) characters(text="2008-12-31T23:59:60.000000Z")
[Error] sample_60.000000Z.xml:4:43: cvc-datatype-valid.1.2.1: '2008-12-31T23:59:60.000000Z' is not a valid value for 'dateTime'.
[Error] sample_60.000000Z.xml:4:43: cvc-type.3.1.3: The value '2008-12-31T23:59:60.000000Z' of element 'leapSecond' is not valid.
endElement(uri="",localName="leapSecond",qname="leapSecond")
endPrefixMapping(prefix="xsi")
endDocument()
Leap seconds are very important for us. We are not randomely using them, but in fact naming them in our XML documents. Therefore, this exception when validating is a BLOCKER for us.
--
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-1379) Validating throws exception on
correct xs:datetime values representing a leap second
Posted by "Gerhard Kozuschek (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720367#action_12720367 ]
Gerhard Kozuschek commented on XERCESJ-1379:
--------------------------------------------
Thank you very much for the fast reaction!
We had not been aware that leap seconds will be gone with XML-Schema-1.1. That changes a lot for us, for related departments, documents to be exchanged etc...
> Validating throws exception on correct xs:datetime values representing a leap second
> ------------------------------------------------------------------------------------
>
> Key: XERCESJ-1379
> URL: https://issues.apache.org/jira/browse/XERCESJ-1379
> Project: Xerces2-J
> Issue Type: Bug
> Components: JAXP (javax.xml.validation)
> Affects Versions: 2.9.1
> Environment: Java-SE-6u13 and u14
> Reporter: Gerhard Kozuschek
>
> W3C and ISO-8601 explicitely names and allows the value 60 for seconds, when the datetime defines a leap second.
> Xerces' "org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.validateDateTime(DateTimeData data)" rejects such datetime values.
> My test XML schema is:
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="unqualified" attributeFormDefault="unqualified">
> <xs:element name="leapSecond" type="xs:dateTime"/>
> </xs:schema>
> My test XML document is:
> <?xml version="1.0" encoding="UTF-8"?>
> <leapSecond xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="usingLeapSecond.xsd"
> >2008-12-31T23:59:60.000000Z</leapSecond>
> Variants ending with "...59:60Z" or "...59:60.000Z" are also rejected.
> "DocumentTracer.java" prints:
> MS-WiXP>java -jar DocumentTracer.jar -v -s -f ..\src\sample_60.000000Z.xml
> setDocumentLocator(locator=org.apache.xerces.parsers.AbstractSAXParser$LocatorProxy@19efb05)
> startDocument()
> startPrefixMapping(prefix="xsi",uri="http://www.w3.org/2001/XMLSchema-instance")
> startElement(uri="",localName="leapSecond",qname="leapSecond",attributes={{uri="http://www.w3.org/2001/XMLSchema-instance",localName="noNamespaceSchemaLocation",qname="xsi:noNamespaceSchemaLocation", type="CDATA",value="usingLeapSecond.xsd"}}) characters(text="2008-12-31T23:59:60.000000Z")
> [Error] sample_60.000000Z.xml:4:43: cvc-datatype-valid.1.2.1: '2008-12-31T23:59:60.000000Z' is not a valid value for 'dateTime'.
> [Error] sample_60.000000Z.xml:4:43: cvc-type.3.1.3: The value '2008-12-31T23:59:60.000000Z' of element 'leapSecond' is not valid.
> endElement(uri="",localName="leapSecond",qname="leapSecond")
> endPrefixMapping(prefix="xsi")
> endDocument()
> Leap seconds are very important for us. We are not randomely using them, but in fact naming them in our XML documents. Therefore, this exception when validating is a BLOCKER for us.
--
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] Closed: (XERCESJ-1379) Validating throws exception on
correct xs:datetime values representing a leap second
Posted by "Gerhard Kozuschek (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gerhard Kozuschek closed XERCESJ-1379.
--------------------------------------
> Validating throws exception on correct xs:datetime values representing a leap second
> ------------------------------------------------------------------------------------
>
> Key: XERCESJ-1379
> URL: https://issues.apache.org/jira/browse/XERCESJ-1379
> Project: Xerces2-J
> Issue Type: Bug
> Components: JAXP (javax.xml.validation)
> Affects Versions: 2.9.1
> Environment: Java-SE-6u13 and u14
> Reporter: Gerhard Kozuschek
>
> W3C and ISO-8601 explicitely names and allows the value 60 for seconds, when the datetime defines a leap second.
> Xerces' "org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.validateDateTime(DateTimeData data)" rejects such datetime values.
> My test XML schema is:
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="unqualified" attributeFormDefault="unqualified">
> <xs:element name="leapSecond" type="xs:dateTime"/>
> </xs:schema>
> My test XML document is:
> <?xml version="1.0" encoding="UTF-8"?>
> <leapSecond xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="usingLeapSecond.xsd"
> >2008-12-31T23:59:60.000000Z</leapSecond>
> Variants ending with "...59:60Z" or "...59:60.000Z" are also rejected.
> "DocumentTracer.java" prints:
> MS-WiXP>java -jar DocumentTracer.jar -v -s -f ..\src\sample_60.000000Z.xml
> setDocumentLocator(locator=org.apache.xerces.parsers.AbstractSAXParser$LocatorProxy@19efb05)
> startDocument()
> startPrefixMapping(prefix="xsi",uri="http://www.w3.org/2001/XMLSchema-instance")
> startElement(uri="",localName="leapSecond",qname="leapSecond",attributes={{uri="http://www.w3.org/2001/XMLSchema-instance",localName="noNamespaceSchemaLocation",qname="xsi:noNamespaceSchemaLocation", type="CDATA",value="usingLeapSecond.xsd"}}) characters(text="2008-12-31T23:59:60.000000Z")
> [Error] sample_60.000000Z.xml:4:43: cvc-datatype-valid.1.2.1: '2008-12-31T23:59:60.000000Z' is not a valid value for 'dateTime'.
> [Error] sample_60.000000Z.xml:4:43: cvc-type.3.1.3: The value '2008-12-31T23:59:60.000000Z' of element 'leapSecond' is not valid.
> endElement(uri="",localName="leapSecond",qname="leapSecond")
> endPrefixMapping(prefix="xsi")
> endDocument()
> Leap seconds are very important for us. We are not randomely using them, but in fact naming them in our XML documents. Therefore, this exception when validating is a BLOCKER for us.
--
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-1379) Validating throws exception on
correct xs:datetime values representing a leap second
Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Glavassevich resolved XERCESJ-1379.
-------------------------------------------
Resolution: Won't Fix
Leap seconds are assigned arbitrarily by a committee. At the time Xerces-J 2.9.1 was released it was likely not known yet whether "2008-12-31T23:59:60.000000Z" would be a valid date. Software cannot know which days in the future will have leap seconds and it is because of this uncertainty that we made a conscious decision not to support them in dateTime values (even for dates in the past). Furthermore, the data binding for dateTime in JAXP (XMLGregorianCalendar) and the XML Schema 1.1 [1] specification explicitly disallows leap seconds. Given the direction in JAXP and the XML Schema WG it is extremely unlikely that we would ever reverse this decision.
[1] http://www.w3.org/TR/2009/CR-xmlschema11-2-20090430/#d-t-values
> Validating throws exception on correct xs:datetime values representing a leap second
> ------------------------------------------------------------------------------------
>
> Key: XERCESJ-1379
> URL: https://issues.apache.org/jira/browse/XERCESJ-1379
> Project: Xerces2-J
> Issue Type: Bug
> Components: JAXP (javax.xml.validation)
> Affects Versions: 2.9.1
> Environment: Java-SE-6u13 and u14
> Reporter: Gerhard Kozuschek
>
> W3C and ISO-8601 explicitely names and allows the value 60 for seconds, when the datetime defines a leap second.
> Xerces' "org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.validateDateTime(DateTimeData data)" rejects such datetime values.
> My test XML schema is:
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="unqualified" attributeFormDefault="unqualified">
> <xs:element name="leapSecond" type="xs:dateTime"/>
> </xs:schema>
> My test XML document is:
> <?xml version="1.0" encoding="UTF-8"?>
> <leapSecond xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="usingLeapSecond.xsd"
> >2008-12-31T23:59:60.000000Z</leapSecond>
> Variants ending with "...59:60Z" or "...59:60.000Z" are also rejected.
> "DocumentTracer.java" prints:
> MS-WiXP>java -jar DocumentTracer.jar -v -s -f ..\src\sample_60.000000Z.xml
> setDocumentLocator(locator=org.apache.xerces.parsers.AbstractSAXParser$LocatorProxy@19efb05)
> startDocument()
> startPrefixMapping(prefix="xsi",uri="http://www.w3.org/2001/XMLSchema-instance")
> startElement(uri="",localName="leapSecond",qname="leapSecond",attributes={{uri="http://www.w3.org/2001/XMLSchema-instance",localName="noNamespaceSchemaLocation",qname="xsi:noNamespaceSchemaLocation", type="CDATA",value="usingLeapSecond.xsd"}}) characters(text="2008-12-31T23:59:60.000000Z")
> [Error] sample_60.000000Z.xml:4:43: cvc-datatype-valid.1.2.1: '2008-12-31T23:59:60.000000Z' is not a valid value for 'dateTime'.
> [Error] sample_60.000000Z.xml:4:43: cvc-type.3.1.3: The value '2008-12-31T23:59:60.000000Z' of element 'leapSecond' is not valid.
> endElement(uri="",localName="leapSecond",qname="leapSecond")
> endPrefixMapping(prefix="xsi")
> endDocument()
> Leap seconds are very important for us. We are not randomely using them, but in fact naming them in our XML documents. Therefore, this exception when validating is a BLOCKER for us.
--
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] Issue Comment Edited: (XERCESJ-1379) Validating throws
exception on correct xs:datetime values representing a leap second
Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720295#action_12720295 ]
Michael Glavassevich edited comment on XERCESJ-1379 at 6/16/09 12:09 PM:
-------------------------------------------------------------------------
Leap seconds are assigned arbitrarily by a committee. At the time Xerces-J 2.9.1 was released it was likely not known yet whether "2008-12-31T23:59:60.000000Z" would be a valid date. Software cannot know which days in the future will have leap seconds and it is because of this uncertainty that we made a conscious decision not to support them in dateTime values (even for dates in the past). Furthermore, the XML Schema 1.1 [1] specification explicitly disallows leap seconds. Given the direction in the XML Schema WG it is extremely unlikely that we would ever reverse this decision.
[1] http://www.w3.org/TR/2009/CR-xmlschema11-2-20090430/#d-t-values
was (Author: mrglavas@ca.ibm.com):
Leap seconds are assigned arbitrarily by a committee. At the time Xerces-J 2.9.1 was released it was likely not known yet whether "2008-12-31T23:59:60.000000Z" would be a valid date. Software cannot know which days in the future will have leap seconds and it is because of this uncertainty that we made a conscious decision not to support them in dateTime values (even for dates in the past). Furthermore, the data binding for dateTime in JAXP (XMLGregorianCalendar) and the XML Schema 1.1 [1] specification explicitly disallows leap seconds. Given the direction in JAXP and the XML Schema WG it is extremely unlikely that we would ever reverse this decision.
[1] http://www.w3.org/TR/2009/CR-xmlschema11-2-20090430/#d-t-values
> Validating throws exception on correct xs:datetime values representing a leap second
> ------------------------------------------------------------------------------------
>
> Key: XERCESJ-1379
> URL: https://issues.apache.org/jira/browse/XERCESJ-1379
> Project: Xerces2-J
> Issue Type: Bug
> Components: JAXP (javax.xml.validation)
> Affects Versions: 2.9.1
> Environment: Java-SE-6u13 and u14
> Reporter: Gerhard Kozuschek
>
> W3C and ISO-8601 explicitely names and allows the value 60 for seconds, when the datetime defines a leap second.
> Xerces' "org.apache.xerces.impl.dv.xs.AbstractDateTimeDV.validateDateTime(DateTimeData data)" rejects such datetime values.
> My test XML schema is:
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="unqualified" attributeFormDefault="unqualified">
> <xs:element name="leapSecond" type="xs:dateTime"/>
> </xs:schema>
> My test XML document is:
> <?xml version="1.0" encoding="UTF-8"?>
> <leapSecond xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="usingLeapSecond.xsd"
> >2008-12-31T23:59:60.000000Z</leapSecond>
> Variants ending with "...59:60Z" or "...59:60.000Z" are also rejected.
> "DocumentTracer.java" prints:
> MS-WiXP>java -jar DocumentTracer.jar -v -s -f ..\src\sample_60.000000Z.xml
> setDocumentLocator(locator=org.apache.xerces.parsers.AbstractSAXParser$LocatorProxy@19efb05)
> startDocument()
> startPrefixMapping(prefix="xsi",uri="http://www.w3.org/2001/XMLSchema-instance")
> startElement(uri="",localName="leapSecond",qname="leapSecond",attributes={{uri="http://www.w3.org/2001/XMLSchema-instance",localName="noNamespaceSchemaLocation",qname="xsi:noNamespaceSchemaLocation", type="CDATA",value="usingLeapSecond.xsd"}}) characters(text="2008-12-31T23:59:60.000000Z")
> [Error] sample_60.000000Z.xml:4:43: cvc-datatype-valid.1.2.1: '2008-12-31T23:59:60.000000Z' is not a valid value for 'dateTime'.
> [Error] sample_60.000000Z.xml:4:43: cvc-type.3.1.3: The value '2008-12-31T23:59:60.000000Z' of element 'leapSecond' is not valid.
> endElement(uri="",localName="leapSecond",qname="leapSecond")
> endPrefixMapping(prefix="xsi")
> endDocument()
> Leap seconds are very important for us. We are not randomely using them, but in fact naming them in our XML documents. Therefore, this exception when validating is a BLOCKER for us.
--
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