You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Mark Nauta (JIRA)" <xm...@xml.apache.org> on 2007/11/13 09:40:52 UTC
[jira] Created: (XMLBEANS-350) xs:integer with decimals not marked
invalid by validator tool
xs:integer with decimals not marked invalid by validator tool
-------------------------------------------------------------
Key: XMLBEANS-350
URL: https://issues.apache.org/jira/browse/XMLBEANS-350
Project: XMLBeans
Issue Type: Bug
Components: Validator
Affects Versions: Version 2.3
Environment: Windows XP
Reporter: Mark Nauta
Priority: Minor
The following sample xml:
<?xml version="1.0" encoding="utf-8"?>
<foo xmlns="test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="test file:///D:/temp/test.xsd">
<bar>123.00</bar>
</foo>
is validated against:
<?xml version = "1.0" encoding = "utf-8"?>
<xs:schema xmlns="test" targetNamespace="test" xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="foo">
<xs:complexType>
<xs:sequence>
<xs:element name="bar" type="barType" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="barType">
<xs:restriction base="xs:integer">
<xs:totalDigits value="3"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
which IMHO should result in 'invalid'. The xmlbeans 2.2.0 and 2.3.0 validator tool return 'valid' however. This is not according to W3c specs:
"integer is derived from decimal by fixing the value of - fractionDigits- to be 0 and disallowing the trailing decimal point. "
--
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: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org
[jira] Commented: (XMLBEANS-350) xs:integer with decimals not
marked invalid by validator tool
Posted by "Aaron Dunlop (JIRA)" <xm...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XMLBEANS-350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877154#action_12877154 ]
Aaron Dunlop commented on XMLBEANS-350:
---------------------------------------
I believe this issue was fixed in commit r938531.
> xs:integer with decimals not marked invalid by validator tool
> -------------------------------------------------------------
>
> Key: XMLBEANS-350
> URL: https://issues.apache.org/jira/browse/XMLBEANS-350
> Project: XMLBeans
> Issue Type: Bug
> Components: Validator
> Affects Versions: Version 2.3
> Environment: Windows XP
> Reporter: Mark Nauta
> Priority: Minor
> Attachments: test-s.xml, test.xsd
>
>
> The following sample xml:
> <?xml version="1.0" encoding="utf-8"?>
> <foo xmlns="test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="test file:///D:/temp/test.xsd">
> <bar>123.00</bar>
> </foo>
> is validated against:
> <?xml version = "1.0" encoding = "utf-8"?>
> <xs:schema xmlns="test" targetNamespace="test" xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified" attributeFormDefault="unqualified">
> <xs:element name="foo">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="bar" type="barType" minOccurs="1" maxOccurs="1"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:simpleType name="barType">
> <xs:restriction base="xs:integer">
> <xs:totalDigits value="3"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:schema>
> which IMHO should result in 'invalid'. The xmlbeans 2.2.0 and 2.3.0 validator tool return 'valid' however. This is not according to W3c specs:
> "integer is derived from decimal by fixing the value of - fractionDigits- to be 0 and disallowing the trailing decimal point. "
--
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: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org
[jira] Commented: (XMLBEANS-350) xs:integer with decimals not
marked invalid by validator tool
Posted by "Quoc Le (JIRA)" <xm...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XMLBEANS-350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709495#action_12709495 ]
Quoc Le commented on XMLBEANS-350:
----------------------------------
I have the same issue. The workaround that I implemented (that fit my project's scenario) is to add a pattern facet to prevent the decimal point from being entered.
<xs:pattern value="[\+]?[0-9]+"/>
> xs:integer with decimals not marked invalid by validator tool
> -------------------------------------------------------------
>
> Key: XMLBEANS-350
> URL: https://issues.apache.org/jira/browse/XMLBEANS-350
> Project: XMLBeans
> Issue Type: Bug
> Components: Validator
> Affects Versions: Version 2.3
> Environment: Windows XP
> Reporter: Mark Nauta
> Priority: Minor
> Attachments: test-s.xml, test.xsd
>
>
> The following sample xml:
> <?xml version="1.0" encoding="utf-8"?>
> <foo xmlns="test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="test file:///D:/temp/test.xsd">
> <bar>123.00</bar>
> </foo>
> is validated against:
> <?xml version = "1.0" encoding = "utf-8"?>
> <xs:schema xmlns="test" targetNamespace="test" xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified" attributeFormDefault="unqualified">
> <xs:element name="foo">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="bar" type="barType" minOccurs="1" maxOccurs="1"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:simpleType name="barType">
> <xs:restriction base="xs:integer">
> <xs:totalDigits value="3"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:schema>
> which IMHO should result in 'invalid'. The xmlbeans 2.2.0 and 2.3.0 validator tool return 'valid' however. This is not according to W3c specs:
> "integer is derived from decimal by fixing the value of - fractionDigits- to be 0 and disallowing the trailing decimal point. "
--
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: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org
[jira] Resolved: (XMLBEANS-350) xs:integer with decimals not marked
invalid by validator tool
Posted by "Cezar Andrei (JIRA)" <xm...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XMLBEANS-350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Cezar Andrei resolved XMLBEANS-350.
-----------------------------------
Assignee: Cezar Andrei
Fix Version/s: Version 2.5.1
Resolution: Fixed
Issue has been fixed, with r938531.
> xs:integer with decimals not marked invalid by validator tool
> -------------------------------------------------------------
>
> Key: XMLBEANS-350
> URL: https://issues.apache.org/jira/browse/XMLBEANS-350
> Project: XMLBeans
> Issue Type: Bug
> Components: Validator
> Affects Versions: Version 2.3
> Environment: Windows XP
> Reporter: Mark Nauta
> Assignee: Cezar Andrei
> Priority: Minor
> Fix For: Version 2.5.1
>
> Attachments: test-s.xml, test.xsd
>
>
> The following sample xml:
> <?xml version="1.0" encoding="utf-8"?>
> <foo xmlns="test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="test file:///D:/temp/test.xsd">
> <bar>123.00</bar>
> </foo>
> is validated against:
> <?xml version = "1.0" encoding = "utf-8"?>
> <xs:schema xmlns="test" targetNamespace="test" xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified" attributeFormDefault="unqualified">
> <xs:element name="foo">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="bar" type="barType" minOccurs="1" maxOccurs="1"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:simpleType name="barType">
> <xs:restriction base="xs:integer">
> <xs:totalDigits value="3"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:schema>
> which IMHO should result in 'invalid'. The xmlbeans 2.2.0 and 2.3.0 validator tool return 'valid' however. This is not according to W3c specs:
> "integer is derived from decimal by fixing the value of - fractionDigits- to be 0 and disallowing the trailing decimal point. "
--
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: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org
[jira] Updated: (XMLBEANS-350) xs:integer with decimals not marked
invalid by validator tool
Posted by "Mark Nauta (JIRA)" <xm...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XMLBEANS-350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Nauta updated XMLBEANS-350:
--------------------------------
Attachment: test-s.xml
test.xsd
> xs:integer with decimals not marked invalid by validator tool
> -------------------------------------------------------------
>
> Key: XMLBEANS-350
> URL: https://issues.apache.org/jira/browse/XMLBEANS-350
> Project: XMLBeans
> Issue Type: Bug
> Components: Validator
> Affects Versions: Version 2.3
> Environment: Windows XP
> Reporter: Mark Nauta
> Priority: Minor
> Attachments: test-s.xml, test.xsd
>
>
> The following sample xml:
> <?xml version="1.0" encoding="utf-8"?>
> <foo xmlns="test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="test file:///D:/temp/test.xsd">
> <bar>123.00</bar>
> </foo>
> is validated against:
> <?xml version = "1.0" encoding = "utf-8"?>
> <xs:schema xmlns="test" targetNamespace="test" xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified" attributeFormDefault="unqualified">
> <xs:element name="foo">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="bar" type="barType" minOccurs="1" maxOccurs="1"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:simpleType name="barType">
> <xs:restriction base="xs:integer">
> <xs:totalDigits value="3"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:schema>
> which IMHO should result in 'invalid'. The xmlbeans 2.2.0 and 2.3.0 validator tool return 'valid' however. This is not according to W3c specs:
> "integer is derived from decimal by fixing the value of - fractionDigits- to be 0 and disallowing the trailing decimal point. "
--
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: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org